Display "No records found" on Access Form (1 Viewer)

luzz

Registered User.
Local time
Yesterday, 19:23
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: 219

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 10:23
Joined
May 7, 2009
Messages
19,237
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
 

luzz

Registered User.
Local time
Yesterday, 19:23
Joined
Aug 23, 2017
Messages
346
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

Top Bottom