View Full Version : Tab Order - Subform Problem


npjonze
09-06-2001, 04:37 AM
Hi all,

I have a main form (based on tblMain) with 2 subforms( based on tblAdd1 & tblAdd2)on it (linked by common field record_id).

My problem is I want tab through the main form as if it were one form. I only need 1 record from tblAdd1 & tblAdd2 to be visible in the main form (ie only show info in subforms which relates to the record shown in the main form - if you need any more detail as to why this is,I'll post again)

Whats the best way to do this? Base the recordsource of the subforms on a query or use the tabstop etc controls? How?

Hope this makes sense!

Many thanks

Garswood
09-06-2001, 06:13 AM
I'm a bit confused with what you are asking. Do you want to tab from field to field irrespective of whether a field is in the main form or subform? If so try this.


in the OnExit event of the field you want to tab from
Forms![YourForm].[YourControl].SetFocus

where YourForm is the forms name and YourControl is the name of the field you want to tab into.
There are other posts with this information which I have used myself.
Hope this is of use to you

npjonze
09-06-2001, 06:32 AM
Thanks, it worked. I thought there would be a simple solution ( to use a cliche - you cant see the wood for the trees sometimes!)

Once again thanks for your prompt reply.