B
bsc gmcc
I am receiving a Runtime error 13, Type mismatch error when running the
below. I know that CInt(Year(Forms!Complaint!txtDateReceived)) returns the
year such as 2009 which is what I want. I also know that if I run a query
with Year([Date_Received]) it also returns the year. So, I have been playing
with this and still can't figure out why I am getting the error.
lngComplaintID = DMax("[StateSeq]", "Complaint", _
"[State_ID] = " & Forms!Complaint!State_ID And "Year([Date_Received]) =
" & CInt(Year(Forms!Complaint!txtDateReceived))) _
+ 1
below. I know that CInt(Year(Forms!Complaint!txtDateReceived)) returns the
year such as 2009 which is what I want. I also know that if I run a query
with Year([Date_Received]) it also returns the year. So, I have been playing
with this and still can't figure out why I am getting the error.
lngComplaintID = DMax("[StateSeq]", "Complaint", _
"[State_ID] = " & Forms!Complaint!State_ID And "Year([Date_Received]) =
" & CInt(Year(Forms!Complaint!txtDateReceived))) _
+ 1