Easy one I am certain but I cannot solve it - I have a form based on a query and all works well but if the query returns no results I get a blank form - how can I prevent the form opening (or make it close) if there is no data present?
I have tried
Private Sub Form_Load()
If IsNull(me.address) Then
MsgBox "There is nothing to display"
DoCmd.Close
End If
End Sub
But no joy - any ideas?
I have tried
Private Sub Form_Load()
If IsNull(me.address) Then
MsgBox "There is nothing to display"
DoCmd.Close
End If
End Sub
But no joy - any ideas?