Message box in a form if criteria met

thedeadzeds

Registered User.
Local time
Today, 13:05
Joined
Jan 8, 2014
Messages
40
Hi Guys, is the below possible?

If datDatefrom or datDateto in frmexample contains any of the dates in tblHoliday, then show a message box saying "you have selected a bank holiday" else do nothing
 
Code:
if Dcount("*","SELECT HolidayName FROM tHolidays WHERE (((tHolidays.DownDate) Between #" & vStartDate & "# And #" & vEndDate & "#))>0 then 
   msgbox "Holiday"
endif
 

Users who are viewing this thread

Back
Top Bottom