F
Frank Stone
I am stumped on this one. I have a form that looks like a
calendar. I have a table with our company holidays. as the
calendar is populated with the month, I want to check the
holiday table and if that is a match, color the calendar
day box red. I am useing DLookup
If DLookup("[HDate]", "tblCalendarHolidays", "[HDate] = '"
& Me.txtD1 & "'") Then
Me("C" & Format(D3, "00")).ForeColor = 255
End If
HDate is the holiday date field
tblcalendarHolidays is the table
Me.txtD1 is the control text box on the form that has the
date i want to check match on.
when i run the code i get a error on DLookup.
Run Tiem Error 62506 - Data type mismatch in criteria
expression.
HDate is formated at Date/time - short date
Me.txtD1 is formated to short date.
I don't understand why i am getting this error. any
suggestions?
calendar. I have a table with our company holidays. as the
calendar is populated with the month, I want to check the
holiday table and if that is a match, color the calendar
day box red. I am useing DLookup
If DLookup("[HDate]", "tblCalendarHolidays", "[HDate] = '"
& Me.txtD1 & "'") Then
Me("C" & Format(D3, "00")).ForeColor = 255
End If
HDate is the holiday date field
tblcalendarHolidays is the table
Me.txtD1 is the control text box on the form that has the
date i want to check match on.
when i run the code i get a error on DLookup.
Run Tiem Error 62506 - Data type mismatch in criteria
expression.
HDate is formated at Date/time - short date
Me.txtD1 is formated to short date.
I don't understand why i am getting this error. any
suggestions?