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

  • Thread starter Thread starter scottb
  • Start date Start date
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
 
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.
 
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.
 
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.
 
Back
Top