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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying query results on a form/report

Status
Not open for further replies.

EPBoone

Technical User
Feb 3, 2001
19
0
0
US
Is there a way to display the information that the user has to enter to get results from a query onto a form or report?
Huh?!?! I mean, say I have a query that asks you to type in a date ('Between [Date] and [Date]'). Is there a way to have those entries displayed on the form or report that you haved based on that query? I have been thinking about this for awhile, but can't come up with anything.

Thanx,
Gene
 
I don't know if I understood you right. I guess what you want to do is create a form that will allow user to type in the start and the end date for your query. If so, then this is what you need to do.

1) Create a Form with two text boxes and a Command button.
2) Your query should look like so:

Select * From Table1 Where Date between
[Forms]![Form1]![txtStart] and [Forms]![Form1]![txtStart]

3) On the Form on Command Button Click event do next:

DoCmd.OpenQuery "Query1", acViewNormal

This should do it for you.
Hope it helps.
 
Look through the NorthWind database
it has some good examples on how to do this easily

HTH "Hacker by Heart"
saenzinc@email.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top