go to another section of form using command button

M

Maggie

I have a form that has many tabs. When a user finishes
updating the information on one tab I want to add command
button that will advance them to the next tab. The tabs
are forms that I have created and then pasted on the tabs
so I don't know if I should open the form - even though it
is already open as part of the sub form.

I will need to do this of the tabs.

Any ideas??

Maggie
 
S

Steve Schapel

Maggie,

No, it is not correct to try to "open" the subforms. Instead, put code
on the Click event of the command buttons, along these lines...
Me.NameOfNextTabPage.SetFocus
 
D

DubboPete

Hi Maggie,

I just done the same sort of thing, so hopefully this will help. I am
assuming your tab form is called 'tabform', and you have 'form1', 'form2',
etc on your tabs.

If you want your focus to go from [lastfield] on 'form1' to [firstfield] on
'form2', then use the AfterUpdate event of [lastfield] to move it... insert
this line of code in the After Update event of [lastfield]...

Forms![tabform]![form2].SetFocus

hope that helps

DubboPete
 
G

Guest

Steve - Thanks this worked great! Maggie
-----Original Message-----
Maggie,

No, it is not correct to try to "open" the subforms. Instead, put code
on the Click event of the command buttons, along these lines...
Me.NameOfNextTabPage.SetFocus

--
Steve Schapel, Microsoft Access MVP


.
 

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