Subform with tabs

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

Guest

I have a form and on it a Subform. In the subform i have tabs to break up
the information. That is all working fine. I have added a button on the
subform to add a new record to the database. The problem is when the button
is clicked a new record is created BUT the tab switchs to the THIRD tab. It
always goes to a field on the third tab. I would like it to default to the
first firld on the first tab.

I have looked at the tab order and it all looks correct there. I can not
figure out what is making it defulat to this field.

Thanks in advance.
 
Beats my why your code is going to tab 3... I've just set up something
similar here and it just stays on the same tab as the one that was active
when the button was clicked. But anyway... just add

docmd.gotocontrol "SubformControl"
docmd.gotocontrol "WhicheverControlYouWant"

....after you've added the new record.

If that doesn't work for you, then what code are you using to add the new
record?
 
Look at the Index of each page. I believe it is zero based. Set the index of
the first page to 0, the second page to 1, etc. Tab order for the pages
follows the index.
 
Thanks for the help. I already checked the index and it is correct. justed
code to reset the focus to the field that I wanted but without that code it
always goes to tab 3. I just can't figure out what would cause it to do that.

Thanks for the help though. I really appriciate it.
 
Back
Top