A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

unhiding and rehide tab on tabbed form



 
 
Thread Tools Display Modes
  #1  
Old March 25th, 2010, 12:25 AM posted to microsoft.public.access.forms
tonkaplayer
external usenet poster
 
Posts: 17
Default unhiding and rehide tab on tabbed form

I have a glorified excel that is wanted in access. One large table with
student number student name, so on. alos in this table is parking sticker
one, (then fields for vehicle 1 info year make etc.), parking sticker
two(then fields for vehicle 2). Show as not to show all this at once since
two vehicels is rare but happens enough, I would like to have a tabbed form
and put vehicle two in the second tab. I am ok up to here. I would like to
have tab two invisible unless needed such as when a second parking sticker is
issued to one student. They drive moms then dads car. Now having said all
this I can hide tab tow in properties I can even make it visible by clicking
on a yes/no button. Problem comes when I go to the next record. I would like
the yes no button to reset to no and the tab to rehide itself. This assumes
of course the next student does not also have two parking stickers. So I see
an if then condition and some property settings. I need the property fields
when the record changes and the if then syntax. A lot I know any help or
good books on teh subject would be aprreciated.
  #2  
Old March 25th, 2010, 03:15 PM posted to microsoft.public.access.forms
Daryl S[_2_]
external usenet poster
 
Posts: 881
Default unhiding and rehide tab on tabbed form

Tonkaplayer -

Use the OnCurrent event to check this each time a new record is displayed.
You can use code like this (but use your control names):

If Me.Vehicle2 is NULL Then
Me.tabControl2.visible = False
Else
Me.tabControl2.visible = True
End If

You will need to allow the user to add a second car when there isn't one, so
you may want to add a button on the first form that is visible only when
Behicle2 is not null that will also make that tab visible so the user can
enter the second car.

--
Daryl S


"tonkaplayer" wrote:

I have a glorified excel that is wanted in access. One large table with
student number student name, so on. alos in this table is parking sticker
one, (then fields for vehicle 1 info year make etc.), parking sticker
two(then fields for vehicle 2). Show as not to show all this at once since
two vehicels is rare but happens enough, I would like to have a tabbed form
and put vehicle two in the second tab. I am ok up to here. I would like to
have tab two invisible unless needed such as when a second parking sticker is
issued to one student. They drive moms then dads car. Now having said all
this I can hide tab tow in properties I can even make it visible by clicking
on a yes/no button. Problem comes when I go to the next record. I would like
the yes no button to reset to no and the tab to rehide itself. This assumes
of course the next student does not also have two parking stickers. So I see
an if then condition and some property settings. I need the property fields
when the record changes and the if then syntax. A lot I know any help or
good books on teh subject would be aprreciated.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:01 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.