Data Type MisMatch . .

Evagrius

Registered User.
Local time
Today, 06:03
Joined
Jul 10, 2010
Messages
170
Hi All,

I attempted several tactics but I couldn't figure this out - I keep getting the error. I am sure it's something simple. Thanks for any help!


Code:
Dim MyStr as Variant
MyStr = ">= 0.75" 
Me.Filter = "[Ratio Type] = 'Acid' And" & "[" & MyFldName & "]= " & MyStr
 
It looks like you've missed a space, which is hard to see with the extraneous concatenation. You're also going to end up with an extra equals sign. Try this:

Me.Filter = "[Ratio Type] = 'Acid' And [" & MyFldName & "] " & MyStr

That presumes that MyFldName will end up being a numeric field rather than a text field.
 
Thanks pbaldy - I left the office but I will give it a go first thing Monday - thank you for taking the time to help.
 
Hi pbaldy - I just wanted to return and say thank you! I integrated your suggestion this morning and the error is resolved. Thanks!
 
Glad it worked for you!
 

Users who are viewing this thread

Back
Top Bottom