3
votes

tablecontinuous formI need to update to visible or invisible a label in a continuous form based on the status of a field in the same record.

I tried with the below but it only takes the value of the first record. In other words it updates visibility to all records based on the first one. If the first record has the field as "converted" then they all get visible... no matter if the rest of the records do NOT have "converted" in that field.

I'm sure I'm doing something wrong but I can't figure out what.

My guesstimate is that I'm addressing the fields wrong using me.fieldname in a continuous form... Should I do something else to get the value for each specific record and affect only that particular record based on that value?

Private Sub Form_Load()

If Me.convertedStatus = "converted" Then
    Me.lblCheckMark.Visible = True
Else
    Me.lblCheckMark.Visible = False
End If


End Sub
1

1 Answers

0
votes

I think you're looking for the Current event, not the Load event. Current triggers when the record becomes the "current" record, so that's once every time you switch records. Just change Form_Load to Form_Current. Check out this page for more information, if you need it.