How can I prevent a NULL from being passed in this simple cmd button so that a msgbox pops up telling the user the enter a value?
***************
Private Sub CmdOpenForm_Click()
Dim rs As DAO.Recordset
Set rs = Forms!frmMainEntry.RecordsetClone
rs.FindFirst "CaseNumber=" & Me!CaseNumber
DoCmd.Close
If Not rs.NoMatch Then Forms!frmMainEntry.Bookmark = rs.Bookmark
End
End Sub
***************
Private Sub CmdOpenForm_Click()
Dim rs As DAO.Recordset
Set rs = Forms!frmMainEntry.RecordsetClone
rs.FindFirst "CaseNumber=" & Me!CaseNumber
DoCmd.Close
If Not rs.NoMatch Then Forms!frmMainEntry.Bookmark = rs.Bookmark
End
End Sub