Parameter

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

HI all again..i stumbeled over something most probably very simple..but

I use this in a query

Field / Days:([Due]-[Date Created])
Criteria / >=[Enter Days:]

I do not receive the result i want..when i enter the number 20..i acctually
also receive lower values..not 20 and more

Thanks again!
 
Try this in the criteria instead
=Val([Enter Days:])

Peter said:
HI all again..i stumbeled over something most probably very simple..but

I use this in a query

Field / Days:([Due]-[Date Created])
Criteria / >=[Enter Days:]

I do not receive the result i want..when i enter the number 20..i acctually
also receive lower values..not 20 and more

Thanks again!
 
As a guess, you are getting results like 2 to 9 (no 1's, no value in the teens
and no values in the one hundreds. If that is right then the query is
treating the fields as if they were strings.

Try

Field / Days: CLng(([Due]-[Date Created]))
Criteria / >= CLng([Enter Days:])

That should work AS LONG AS Due and Date Created are never blank.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
Thanks Ronaldo and John, i will laborate with both options! Thanks!

John Spencer MVP said:
As a guess, you are getting results like 2 to 9 (no 1's, no value in the teens
and no values in the one hundreds. If that is right then the query is
treating the fields as if they were strings.

Try

Field / Days: CLng(([Due]-[Date Created]))
Criteria / >= CLng([Enter Days:])

That should work AS LONG AS Due and Date Created are never blank.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
HI all again..i stumbeled over something most probably very simple..but

I use this in a query

Field / Days:([Due]-[Date Created])
Criteria / >=[Enter Days:]

I do not receive the result i want..when i enter the number 20..i acctually
also receive lower values..not 20 and more

Thanks again!
 
Back
Top