Type mismatch error

aman

Registered User.
Local time
Yesterday, 18:14
Joined
Oct 16, 2008
Messages
1,251
Hi Guys

I am trying to use like operator in the following statement but getting type mismatch error.
Code:
i = DCount("SendingDept", "maintable", "SendingDept='AACP' _
    and RDateMPU>=#" & Format(Combo1, "mm/dd/yyyy") & "# _
    and RDateMPU<=#" & Format(Combo3, "mm/dd/yyyy") & "# _
    and reason like 'No Frontsheet Attached' & " * " ")

Can anyone please suggest me in this.

Thanks
AMan
 
Last edited by a moderator:
possibly:
Code:
i = DCount("SendingDept", "maintable", "SendingDept='AACP' _
    and RDateMPU>=#" & Format(Combo1, "mm/dd/yyyy") & "# _
    and RDateMPU<=#" & Format(Combo3, "mm/dd/yyyy") & "# _
    and reason like 'No Frontsheet Attached[COLOR=red]*' [/COLOR]")
it sounds like one of the parameters entered is the wrong data type. not sure if that will fix it or if you have to do some conversion like CDate or similar.
 

Users who are viewing this thread

Back
Top Bottom