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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|