How to Query with User Prompt

JGravesNBS

Registered User.
Local time
Today, 13:38
Joined
Apr 5, 2014
Messages
58
I have the following hard coded query that returns all the members that have 25 years of service

Field: Years: DateDiff("yyyy",[17 Init Date],Now())
Criteria: 25

How can I change it so the query will prompt the user to enter the date (Now) I want to calculate to?
 
Simply replace Now() with [Enter Date]
 
now does not return just a date, it also returns a time.

And to answer your question, the simple answer is

Field: Years: DateDiff("yyyy",[17 Init Date],[Enter Date])

but if the user is not opening the query from the navigation window, it may not work because you can't use parameter queries in many situations
 

Users who are viewing this thread

Back
Top Bottom