Tab Order in Access

J

John Torres

I have a Main form with 2 sub forms but we enter data up to 1st sub form
only and do the 2nd sub form for updates on a later date. So the tab end on
the last field of 1st Sub Form but when you enter new data the tab starts
from where it was left out from the previous form. Is there a way to
automatically go to 1st Tab when opening a new form?

Thanks in advance!

John
 
N

Nicholas Scarpinato

I'm not 100% sure on this, but here's something to try. In the AftertUpdate
event of the last form of the subform, put this code in:

Private Sub Textboxname_AfterUpdate()
Me![FormFieldName].SetFocus
End Sub

If the first field you're wanting to go back to is on the parent form, use
Me!Parent.[FormFieldName].SetFocus

That should force it to start at the beginning of the tab stop list.
 
J

John Torres

It didn't work but thanks for trying.. It still go back to the last field
when new form is entered. They just have to use the mouse to go back to the
first field- no big deal.
Thanks.

Nicholas Scarpinato said:
I'm not 100% sure on this, but here's something to try. In the
AftertUpdate
event of the last form of the subform, put this code in:

Private Sub Textboxname_AfterUpdate()
Me![FormFieldName].SetFocus
End Sub

If the first field you're wanting to go back to is on the parent form, use
Me!Parent.[FormFieldName].SetFocus

That should force it to start at the beginning of the tab stop list.

John Torres said:
I have a Main form with 2 sub forms but we enter data up to 1st sub form
only and do the 2nd sub form for updates on a later date. So the tab end
on
the last field of 1st Sub Form but when you enter new data the tab starts
from where it was left out from the previous form. Is there a way to
automatically go to 1st Tab when opening a new form?

Thanks in advance!

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top