Tabbed SubForms Coding - Return to First Tab?

R

Robert T

Hi:

I'm designing my first Tabbed SubForm in Access 2003 and I noticed a few
minor issues that I find puzzling. Here they are:

1. If I place a New Record command button on the tabbed sub form, I noticed
that it shows up on every tab. Why? It would be nice to have a New Record
button show up only on Tab One.
2. Since the New Record command button shows up on every form, I moved it
over to the side. When the user clicks on a New Record, I want Access to move
to the First Tab [Page 0] because that's where the New Record info is
entered. How do I code that?
3. Is there a way to change tab colors and/or the colors of the tabs
themselves?

Thanks,
Robert
 
M

Maurice

Robert,

1. Before placing any controls on a tab make sure that this specific tab is
selected. You've probably got the tabcontrol selected. That way the button
will be visible on all the tabs. When in designmode you can check by clicking
the specific page of the tabcontrol you should then see something like
[page0] in the properties of the tabcontrol. You can also click on the
specific tab that way you now it has got focus in designtime.

2. In the after update of the button place the following code:

me.[tabname].pages(0).setfocus '- where tabname is the name of your tabcontrol

you can also refer to the pagename instead of the 0 like this:
me.tabname.pages("page0").setfocus

3. You can't change colors of tabs. I believe Stephen Lebans has some tool
for this. You migth want to take a look here:
http://www.lebans.com/tabcolors.htm

hth
 
R

Robert T

Hi Maurice:

Thanks so much for your detailed, excellent response. I'm still not sure
what you mean by selecting the TabControl as opposed to clicking on what? I
guess I'll play with the Tabbed SubForm again and maybe I'll figure out where
I should click. Nonetheless, your response was right on the money.

Thanks so much,
Robert

Maurice said:
Robert,

1. Before placing any controls on a tab make sure that this specific tab is
selected. You've probably got the tabcontrol selected. That way the button
will be visible on all the tabs. When in designmode you can check by clicking
the specific page of the tabcontrol you should then see something like
[page0] in the properties of the tabcontrol. You can also click on the
specific tab that way you now it has got focus in designtime.

2. In the after update of the button place the following code:

me.[tabname].pages(0).setfocus '- where tabname is the name of your tabcontrol

you can also refer to the pagename instead of the 0 like this:
me.tabname.pages("page0").setfocus

3. You can't change colors of tabs. I believe Stephen Lebans has some tool
for this. You migth want to take a look here:
http://www.lebans.com/tabcolors.htm

hth
--
Maurice Ausum


Robert T said:
Hi:

I'm designing my first Tabbed SubForm in Access 2003 and I noticed a few
minor issues that I find puzzling. Here they are:

1. If I place a New Record command button on the tabbed sub form, I noticed
that it shows up on every tab. Why? It would be nice to have a New Record
button show up only on Tab One.
2. Since the New Record command button shows up on every form, I moved it
over to the side. When the user clicks on a New Record, I want Access to move
to the First Tab [Page 0] because that's where the New Record info is
entered. How do I code that?
3. Is there a way to change tab colors and/or the colors of the tabs
themselves?

Thanks,
Robert
 
R

Robert T

Hi Maurice:

I went back and played with the form. Now I know what you meant when you
talked about the TAB vs. The TabControl.

Thanks Again,
Robert

Maurice said:
Robert,

1. Before placing any controls on a tab make sure that this specific tab is
selected. You've probably got the tabcontrol selected. That way the button
will be visible on all the tabs. When in designmode you can check by clicking
the specific page of the tabcontrol you should then see something like
[page0] in the properties of the tabcontrol. You can also click on the
specific tab that way you now it has got focus in designtime.

2. In the after update of the button place the following code:

me.[tabname].pages(0).setfocus '- where tabname is the name of your tabcontrol

you can also refer to the pagename instead of the 0 like this:
me.tabname.pages("page0").setfocus

3. You can't change colors of tabs. I believe Stephen Lebans has some tool
for this. You migth want to take a look here:
http://www.lebans.com/tabcolors.htm

hth
--
Maurice Ausum


Robert T said:
Hi:

I'm designing my first Tabbed SubForm in Access 2003 and I noticed a few
minor issues that I find puzzling. Here they are:

1. If I place a New Record command button on the tabbed sub form, I noticed
that it shows up on every tab. Why? It would be nice to have a New Record
button show up only on Tab One.
2. Since the New Record command button shows up on every form, I moved it
over to the side. When the user clicks on a New Record, I want Access to move
to the First Tab [Page 0] because that's where the New Record info is
entered. How do I code that?
3. Is there a way to change tab colors and/or the colors of the tabs
themselves?

Thanks,
Robert
 
J

Jan Baird

Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.
 
J

Jan Baird

Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.
 

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