Continuous form, current event

C

Chris

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
 
C

Chris

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.
 
S

Sylvain Lafontaine

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
 

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