DateDiff with a User-specified Parameter

G

Guest

The query calculates the datediff of two dates and has a parameter >=[Minimum
Age:]. The datediff works fine but when specifying the age, most records
return, including those that are outside the range. If the value is put on
the parameter line, It WORKS! It's just that the run-time parameter is
largely, but not entirely, ignored?

What's the solution?
Thanks!
RO
 
J

John Spencer (MVP)

No, runtime parameters are not ignored. Could you post the SQL of the query
that is giving you "bad" results? It may be something as simple as you having
to declare the parameter type so the SQL query understands what you are entering correctly.
 

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