Display "No records found" on Access Form

luzz

Registered User.
Local time
Today, 12:37
Joined
Aug 23, 2017
Messages
346
Hi guys, how can i add the code where it will display "No record found,check again" error message when user key in PO number that are not saved in the database?
PO: ABC17/123

Thank you guys!
 

Attachments

  • search.png
    search.png
    10 KB · Views: 275
Tst it first before setting the recordsource:

If dcount("*", "mxd", "mxdpo like '*" & me. TxtKeywords & "*'") =0 then
Msgbox "No record found"
Else
'Set recordsource here
End If
 
Tst it first before setting the recordsource:

If dcount("*", "mxd", "mxdpo like '*" & me. TxtKeywords & "*'") =0 then
Msgbox "No record found"
Else
'Set recordsource here
End If

Thank you! It works~
 

Users who are viewing this thread

Back
Top Bottom