glb
Nov 20 2003, 08:42 AM
I have a decimal field that I'm trying to query. If I set up the criteria with a numeric value it queries just fine.If I set it up for an answer [Enter Criteria] it finds nothing. All other non-decimal fields work fine. What to do?
BenPurser
Nov 20 2003, 08:50 AM
Two thoughts, the first being a SERIOUS SWAG
try CDbl([Enter Criteria])
though, frankly, I doubt this will work....
Next, can you have your user enter the criteria in an unbound text box on a form, and have the criteria be:
forms!formname.textboxname
where formname and textboxname are replaced with the real form and control names??
HTH
Ben
glb
Nov 20 2003, 09:09 AM
The serious SWAG worked! Why does that work? Thanks
BenPurser
Nov 20 2003, 09:22 AM
Because you force access to treat the input as a number--converting it to a double type. if you enter a criteria directly, it takes on the type of the field, but if you use a prompt, it gets treated as text....another fine 'feature' of access..
Ben
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.