Hi,
ipcisID is the priomary key of the table I am searching, I have a combobox that allows the user to input the ipcidID and it then goes to that record.
I have this code on an onclick event of a combo box:
Sub Combo38_AfterUpdate()
Dim strSearch As String, rsCL As DAO.Recordset
strSearch = Me.Combo38
Set rsCL = Forms!frmmain.Form.RecordsetClone
rsCL.FindFirst "[ipcisID] = '" & strSearch & "'"
Forms!frmmain.Form.Bookmark = rsCL.Bookmark
End Sub
How can I make it say "no ipcisID found" if an entry is entered that does not exist, and I also need to prevent it from crashing if a null entry is input.
Many thanks
ipcisID is the priomary key of the table I am searching, I have a combobox that allows the user to input the ipcidID and it then goes to that record.
I have this code on an onclick event of a combo box:
Sub Combo38_AfterUpdate()
Dim strSearch As String, rsCL As DAO.Recordset
strSearch = Me.Combo38
Set rsCL = Forms!frmmain.Form.RecordsetClone
rsCL.FindFirst "[ipcisID] = '" & strSearch & "'"
Forms!frmmain.Form.Bookmark = rsCL.Bookmark
End Sub
How can I make it say "no ipcisID found" if an entry is entered that does not exist, and I also need to prevent it from crashing if a null entry is input.
Many thanks