Data Type Mismatch Help!

Stang70Fastback

Registered User.
Local time
Today, 14:55
Joined
Dec 24, 2012
Messages
132
strFilter = "[Start Date] >= #" & Me.SrchDate & "# AND [End Date] <= #" & Me.SrchDate & "#"

Can someone tell me how to solve my data type mismatch? It is supposed to be filtering records to only show those where the user-entered date falls between the start and end date. I can't seem to figure out the proper way to relate the date in the text box.

I've also tried without the hashtags. I've tried with apostrophes. What am I doing wrong?!

The textbox 'SrchDate,' by the way, is unbound and has the Format property set to Short Date.
 
That's not the line of code where the datatype mismatch is happening.

Click Debug when the error message comes up and tell us what line it highlights.
 
You're right! I wasn't even being given a 'debug' option in the error window. Turns out it pulled that code into the "Filter" property of the form and didn't update when I changed it in the VBA window. Fixed! Thanks!
 
Yup. Turns out the code above works (it was the hashtags that I was missing originally).
 

Users who are viewing this thread

Back
Top Bottom