Continuous form, current event

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This should be easy, right? The following code either sets all lblcancelled
to visible to true or sets them all to false...seems to work for the first
record on the continuous form and never displays correctly for the remaining
records.

Do continuous forms work differently regarding this?

Private Sub Form_Current()
If Me.ckCancelled = True Then
Me.lblCancelled.Visible = True
ElseIf Me.ckCancelled = False Then
Me.lblCancelled.Visible = False
End If
End Sub
 
Please disregard. Found a solution.

I created a textbox and test in the control source using IIF statement. If
its true "X" and if not "". Works fine.
 
Display the value of Me.ckCancelled to see if it's what your are expecting.

Also, for a better visual effect, change the value for Visible only when
it's necessary:

if (Me.lblCancelled.Visible = false) then Me.lblCancelled.Visible = true
 
Back
Top