Set visibility of a field on a form based on value of checkbox

S

scottb

I have a check box (ckbMoveFlag)and a field (MoveDate) on
a form. I would like to be able to set the visibility on
(MoveDate) based upon whether (ckbMoveFlag) is selected (-
1). I think I should create this on the afterupdate event
of (ckbMoveFlag) and use something like If ckbMoveFlag=0
then MoveDate.visibility = No. I can't find anything with
Access help to assist with this. Any direction would be
appreciated. Thank you. scott
 
S

scottb

Thank you for your help. It's kind of working. What
event should I asssociate it with to make (MoveDate)
visible or not visible upon the form being opened. Right
now the checkbox will toggle the visibility of (MoveDate)
if I manually click it. Is it possible for the visibility
to be set based upon the value of the checkbox upon the
form being opened? thanks again.
 
R

Randy Wayne

Yes. Use the Form_Load() event if you want it to set the
visible property as the form opens.

There is a section in Access Help that descibes the
timing of events. In Help, go to the index and type in
EVENT. Depending on your version of Access, a number of
topics will appear. Look for one like "Events and Event
Properties". There is a list of events and how they work.
 
M

Marshall Barton

scottb said:
Thank you for your help. It's kind of working. What
event should I asssociate it with to make (MoveDate)
visible or not visible upon the form being opened. Right
now the checkbox will toggle the visibility of (MoveDate)
if I manually click it. Is it possible for the visibility
to be set based upon the value of the checkbox upon the
form being opened?


If your form can scroll to more than one record, then you
should use the Current event. This way you can adjust the
visibility of the text box as you scroll from one record to
the next.
 

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