conditionalTextbox visibility

  • Thread starter Thread starter Dave Smith
  • Start date Start date
D

Dave Smith

Hi all, i would like to have a text box that is visible depending on a
checkbox value. i have tried my best with the conditional formatting, & i
managed to get some code to work on the _afterupdate event but it would only
change after the first update. anyhow i'm probably frustrating you by
dribbling....
i want the text box to be visible when checkbox=Yes & invisible when =No
thankyou

Dave Smith
 
Dave,

Assuming the textbox and checkbox are named Text1 and Check1
respectively, you need to put the following code in the checkbox's After
Updade (or On Change) event:

Me.Text1.Visible = Me.Check1

Moreover, if the checkbox is bound to a table field, you should also put
the same code in the form's On Current event, so the textbox is made
visible / invisile depending on the value of the checkbox when you first
open the form, and as you scroll through records.

HTH,
Nikos
 
that got it thankyou

Dave

Nikos Yannacopoulos said:
Dave,

Assuming the textbox and checkbox are named Text1 and Check1
respectively, you need to put the following code in the checkbox's After
Updade (or On Change) event:

Me.Text1.Visible = Me.Check1

Moreover, if the checkbox is bound to a table field, you should also put
the same code in the form's On Current event, so the textbox is made
visible / invisile depending on the value of the checkbox when you first
open the form, and as you scroll through records.

HTH,
Nikos
 

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

Back
Top