Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can format queries to forms??.......

Status
Not open for further replies.

JPL333

Technical User
Mar 12, 2002
5
GB
Can you create a form that will run a query between 2 dates

you have your form with date A and date B and you just input the two dates.

Hopefully it returns the data as it would normally from a simple query with the between date criteria which you can then put into a report

I need to do this as part of a work project as it is easier for people to understand the form rather than the whole query proceedure

Any help as ever is much appreciated (could not believe the help i got from my first post)

Thanks

JPL
 
Sure, you can reference the dates on your form like this in SQL:

SELECT a.x, a.y, a.z
FROM a
WHERE a.myDate between Forms!myForm!myStartDate and Forms!myForm!myEndDate;

or in query design view, put:

between Forms!myForm!myStartDate and Forms!myForm!myEndDate

in the criteria box.

Best Regards,
Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top