ACCESS - can i display a field if a condition is met in another fi

S

SuzyQ2k

using 2003 ACCESS Professional - need to have a form with a check box. If it
is checked another field will display or activate.
 
C

Carl Rapson

Use the checkbox's AfterUpdate or Clicked event. You can enable/disable
another control (based on whether the checkbox is checked or not), or you
can make another control visible/invisible with that control's Visible
property.

If you also want this to happen when an existing record is displayed in the
form, use the form's Current event, same code as in the checkbox's event.

Carl Rapson
 
D

Daryl S

SuzyQ2k -

Yes, you can do this. You should put this code in the On Click event for
your checkbox (use your control names):

Me.fieldName.visible = Me.CheckboxName.Value

Depending on the use of the form, you may want to set the control with the
field to be invisible by default, and only display it if the checkbox is
checked. If this is a form used to view existing records as well as adding
new records, then you will want to add the above code to the On Current event
of the form as well, so it adjusts while scrolling between records.
 

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