Parameter

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!
 
R

RonaldoOneNil

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!
 
J

John Spencer MVP

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
 
P

Peter

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top