Conditional Visible

G

George

I have a View Only form which displays individual
records. The query on which the form is based has a
Yes/No checkbox for a Red Flag on the record.

I want to display a RED FLAG label on the form if the
checkbox is checked. I don't want the label displayed if
the checkbox is not checked.

When the form is opened, the primary key field has the
focus. I think that I need to write some VB code and
attach it to the OnGotFocus Event of the Primary Key
field. Beyond that I'm lost.

Thanks for any help and suggestions!
 
K

Ken Snell

I would use the OnCurrent event of the form to do what you seek:

Private Sub Form_Current()
Me.RedFlagLabelName.Visible = Me.CheckboxName.Value
End Sub
 

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