UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Move Focus From One Subform To Another On The Same Main Form, Access 2016    
 
   
rmcgaffic
post Dec 9 2017, 04:47 PM
Post#1



Posts: 121
Joined: 18-June 06



I am having trouble with syntax on moving from one subform to another on the same form.

frmMain has two subforms: subformA and subformB

subformA is defined as a single form.
subformB is defined as a continuous form.

When a move to a new record on frmMain, both subforms are ready for data entry.

I want use code for the AfterUpdate event for SubformA to move to SubformB.

If I don't use this code, then tabbing on subformA will simply cycle repeatedly through all the fields on subformA.

I have to manually place the cursor on subformB.

I have tried the following code for subformA's after update event with no luck:
Forms!frmMainform!subformB.Form!FirstFieldofSubformB.SetFocus

Is there are property that will achieve the desired behavior. I tried Cycle and it had no effect;
I was hoping to cycle through the fields of subformA once and then move onto subformB.

Any insights would be much appreciated.

Thanks,
Bob McGaffic



Go to the top of the page
 
theDBguy
post Dec 9 2017, 05:09 PM
Post#2


Access Wiki and Forums Moderator
Posts: 71,919
Joined: 19-June 07
From: SunnySandyEggo


Hi Bob,

To move from one subform to another, try setting the focus to something on the main form first.

Hope that helps...

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 
slacka
post Dec 10 2017, 03:00 AM
Post#3



Posts: 10
Joined: 2-December 17



last field of subform A. OnKeyDown event, if tab was pressed, set focus on first field of subform B.
last field of subform B. OnKeyDown event, if tab was pressed, set focus on first field of subform A
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    20th April 2018 - 07:03 PM