Tabbing to top of next subform - not next record.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using Access 2002.

I have a data gathering main form that has multiple tabbed subforms to input
the necessary data. These forms read/write from a query to a table on a back
end DB.

I currently have the tab order set for each of the subforms, but ..........

How do I force the tab action to jump from the last entry on say subform 1
to the first entry on subform 2. I do not want the users to jump to
different records between subfoms.

TIA
JPGeorge
 
tina, Each of the subforms exists on a tabbed page on the main form. When I
click on the main form, it shows only a single tab control that I haven't
identified yet. What I am looking for is a command that I can put in the
AfterUpdate control for the last entry on the page which will gain focus on
the first entry of the next page (all in the same record).

JPGeorge
 
okay, i'll use an example: SubformA (in "container" subform control also
named SubformA) with the last control in its' Tab order as ControlZ, and
SubformB (in "container" subform control also named SubformB) with the first
control in its' Tab order as ControlA. in ControlZ's AfterUpdate event, try

Me.Parent!SubformB.SetFocus
Me.Parent!SubformB!ControlA.SetFocus

note that this code will only fire if data is actually
entered/edited/deleted in ControlZ. if that doesn't quite suit your purpose,
you might try running the code in ControlZ's Exit event instead. if the
subform's Cycle property is set to CurrentRecord, you could also try using
the "container" subform control's Exit event. in that case the code would be

Me!SubformB.SetFocus
Me!SubformB!ControlA.SetFocus

also note that the name of a subform *may not be* the same as the name of
its' "container" subform control within the main form. for the code above,
you need to make sure you're using the name of the container subform
control. to get that name, open the main form in design view. click *once*
on a subform, within the main form, to select it. in the Properties box,
click the Other tab, and look at the Name property.

hth
 
Back
Top