By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,544 Members | 2,021 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,544 IT Pros & Developers. It's quick & easy.

Tab Control question in Access 2007

P: 6
Can one use the tab control for one to one related tables? Can I also show/hide a tab page based on a value of a field? ie. Men Only \ Women Only tabs based on the field Sex.

And is it me or by design in 2007, when adding controls to the other pages in form design view, the controls on page one do not disappear when going to page two. How can I be sure that the controls are being added to the page and not the form itself since it states in the article section:

Quote:
Originally Posted by missinglinq

This is the really important part: when you go to add a control to a tabbed page, you must first click to select one of the pages, then add the control. Otherwise, the control will be added to the form itself, and will show through on all tabbed pages!

Could it be the transparent settings? Since when I drop a control and it falls to the form instead of the tab control, I do not see it at all. The background of the Tab Control area is gray.
Jun 27 '07 #1
Share this Question
Share on Google+
3 Replies


Expert 100+
P: 344
Can one use the tab control for one to one related tables? Can I also show/hide a tab page based on a value of a field? ie. Men Only \ Women Only tabs based on the field Sex.

And is it me or by design in 2007, when adding controls to the other pages in form design view, the controls on page one do not disappear when going to page two. How can I be sure that the controls are being added to the page and not the form itself since it states in the article section:

Quote:
Originally Posted by missinglinq

This is the really important part: when you go to add a control to a tabbed page, you must first click to select one of the pages, then add the control. Otherwise, the control will be added to the form itself, and will show through on all tabbed pages!

Could it be the transparent settings? Since when I drop a control and it falls to the form instead of the tab control, I do not see it at all. The background of the Tab Control area is gray.
Hi, not sure what you mean by using a tab control for 1-1 tables, you can use them on any form.

Yes you can hide tab controls depending upon a field. Give each tab a sensible name, not page 1, page 2 (say tabMale, tabFemale) and then use
Expand|Select|Wrap|Line Numbers
  1. if Sex="Male" then
  2.   tabMale.Visible = true
  3.   tabFemale.Visible=False
  4. else
  5.   tabMale.Visible=false
  6.   tabFemale.visible=true
  7. end if
  8.  
Make sure that you have set the focus to a control that is not on the tab you are about to make invisible.

Next point about the controls being visible. I think you are dropping the controls onto the form, not the tab. You must click on the tab control itself before dropping a control onto it. If you are doing it correctly, when you click on the toolbox to create, say, a combo box and then hover the mouse over the tab control, it will change colour. If it does not change colour, you are about to drop the control onto the form, not the tab. (Well, it does that up to 2003, I assume the same for 2007)
Jul 5 '07 #2

P: 6
Next point about the controls being visible. I think you are dropping the controls onto the form, not the tab. You must click on the tab control itself before dropping a control onto it. If you are doing it correctly, when you click on the toolbox to create, say, a combo box and then hover the mouse over the tab control, it will change colour. If it does not change colour, you are about to drop the control onto the form, not the tab. (Well, it does that up to 2003, I assume the same for 2007)
Thanks, I figured out what I was doing wrong, and yes I was dropping onto the form and not into the Tab control page. I also decided to create subforms from the related tables and I add the subform control to each page, makes it easier.

Thanks for the tip about the the focus when setting the tabs visible property.

Andrew
Jul 9 '07 #3

Expert 100+
P: 344
Thanks, I figured out what I was doing wrong, and yes I was dropping onto the form and not into the Tab control page. I also decided to create subforms from the related tables and I add the subform control to each page, makes it easier.

Thanks for the tip about the the focus when setting the tabs visible property.

Andrew
More than welcome, Tab controls can be very powerfull, hope you enjoy using them
Jul 9 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.