Command Button VBA

P

pbalmanno

Not sure if this is the right UG but please forgive and redirect if
necesary. Old guy returning to using access (97 was the last I programmed
VBA in). Once I remembered programming a command button to change from
subsequent tab pages back to the first tab page. Can you still do that in
2007 and has the coding changed since back then?

Thanks
 
G

Graham Mandeno

Hi pbalmanno

Yes, you have the correct newsgroup and no, the code has not changed.

Either set the tab control's value by page index:

Me.[name of tab control] = 0

or set focus to the required tab page:

Me.[name of tab page].SetFocus
 
M

Marshall Barton

pbalmanno said:
Not sure if this is the right UG but please forgive and redirect if
necesary. Old guy returning to using access (97 was the last I programmed
VBA in). Once I remembered programming a command button to change from
subsequent tab pages back to the first tab page. Can you still do that in
2007 and has the coding changed since back then?


It should not have changed:
Me.tabcontrol = 0

Why do you need a command button to do the same thing as
clicking on the first page's tab?
 
P

pbalmanno

Thanks, for the update.

Graham Mandeno said:
Hi pbalmanno

Yes, you have the correct newsgroup and no, the code has not changed.

Either set the tab control's value by page index:

Me.[name of tab control] = 0

or set focus to the required tab page:

Me.[name of tab page].SetFocus

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand


pbalmanno said:
Not sure if this is the right UG but please forgive and redirect if
necesary. Old guy returning to using access (97 was the last I programmed
VBA in). Once I remembered programming a command button to change from
subsequent tab pages back to the first tab page. Can you still do that
in 2007 and has the coding changed since back then?

Thanks
 
P

pbalmanno

Thanks, for the update. I have users that can't perceive of using the tab
itself.
Maybe it's too small for them or they're used to a button to do everything.
 

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