I am calling a continous form from a combo box on another form. The code below used to warn me that there were no records and shut the form down to avoid showing a blank form.
All was working fine until I changed the properties of the continous form to "Allow Additions = No" to remove the spare blank line at the bottom of the records (just for neatness really).
Now, if there are no records to display, the Me.TxtUnit is not Null anymore. It does not seem to exist. If I hover the mouse over it (in VBA) I get no response at all.
How can I get my Msgbox back please ?
Oscar
Code:
Private Sub Form_Load()
If IsNull(Me.TxtUnit) Then
MsgBox "There are no operations recorded for this Unit", vbOKOnly, "No Recorded Operations"
DoCmd.Close
End If
End Sub
All was working fine until I changed the properties of the continous form to "Allow Additions = No" to remove the spare blank line at the bottom of the records (just for neatness really).
Now, if there are no records to display, the Me.TxtUnit is not Null anymore. It does not seem to exist. If I hover the mouse over it (in VBA) I get no response at all.
How can I get my Msgbox back please ?
Oscar