Conditional Visible

  • Thread starter Thread starter George
  • Start date Start date
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!
 
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
 
Back
Top