My Assistant
![]() ![]() |
|
|
Nov 20 2003, 08:42 AM
Post
#1
|
|
|
UtterAccess Enthusiast Posts: 63 |
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?
|
|
|
|
Nov 20 2003, 08:50 AM
Post
#2
|
|
|
UtterAccess VIP Posts: 5,244 From: Northern Virginia |
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 |
|
|
|
Nov 20 2003, 09:09 AM
Post
#3
|
|
|
UtterAccess Enthusiast Posts: 63 |
The serious SWAG worked! Why does that work? Thanks
|
|
|
|
Nov 20 2003, 09:22 AM
Post
#4
|
|
|
UtterAccess VIP Posts: 5,244 From: Northern Virginia |
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 |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 22nd May 2013 - 12:15 AM |