Text box to disappear

fixious123

Registered User.
Local time
Today, 17:47
Joined
Oct 3, 2002
Messages
49
Hello and Im slowly learning the basics of Access thanks to this forum. Well Im stumped though on how to get five of my text boxes to disappear on my form when I check a checkbox. Its for a shot database and this particular shot is a series with an annual booster. What I want to see on the form is only the date taken and the date due which would be the annual booster. No need to show all the shots if all they need is the booster. Thank you...
 
This should do it:
If me.YourBoosterCheckBoxName = -1 then 'need the shot so hide the other textboxes
me.TextBox1.visible = false
me.TextBox2.visible = false
'etc....
else
end if

Put this in the 'On_Click' event of the booster checkbox if you want it to work when you check the box. Also searching for "hide textbox" on this forum will provide many answers for this question...

HTH,
Kev
 
Perfect but....

Now the text boxes disappear on each individual record how do I stop that from happening?
 
Now the text boxes disappear on each individual record how do I stop that from happening?

Put the code in both the 'On_Click' event for the check box AND the 'On_Current' event for the form... THis should take care of your problem.

HTH,
Kev
 
No problem! :D

Good luck the rest of the way and post back to the forum if you need additional help...

Kev
 

Users who are viewing this thread

Back
Top Bottom