Hi Folks,
I have a command button that essentially opens a form based on a date populated by the user so that any records matching that date will be returned:
DoCmd.OpenForm "Scheduling", , , "[Date of Appt] = Forms!FINDSCHEDULING!Text22" & " AND " & "[Agency] = Forms!FINDSCHEDULING!Text46"
It works perfectly fine; however, if a user searches for a date that results in no records match/returned, the form still opens ... is there a way that if no records are found, instead of opening the blank form I can just do a msgbox "No records found".
Thank you for any assistance you can provide,
Joe
I have a command button that essentially opens a form based on a date populated by the user so that any records matching that date will be returned:
DoCmd.OpenForm "Scheduling", , , "[Date of Appt] = Forms!FINDSCHEDULING!Text22" & " AND " & "[Agency] = Forms!FINDSCHEDULING!Text46"
It works perfectly fine; however, if a user searches for a date that results in no records match/returned, the form still opens ... is there a way that if no records are found, instead of opening the blank form I can just do a msgbox "No records found".
Thank you for any assistance you can provide,
Joe