gojets1721
Registered User.
- Local time
- Today, 10:18
- Joined
- Jun 11, 2019
- Messages
- 430
I have a label in a subform that I only want to be visible if the recordset of the subform is 0. I used the below VBA in the on current event of the subform to achieve that.
It works in the parent form EXCEPT when the record set isn't 0. When moving to the next record in the parent form, the label doesn't update to be visible even if the subform's record set is zero.
Any suggestions on what I'm doing wrong?
Code:
Private Sub Form_Current()
Me.lblNoRecords.Visible = Me.Recordset.RecordCount = 0
End Sub
It works in the parent form EXCEPT when the record set isn't 0. When moving to the next record in the parent form, the label doesn't update to be visible even if the subform's record set is zero.
Any suggestions on what I'm doing wrong?