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

Form Help

Status
Not open for further replies.

bobo0605

MIS
Dec 4, 2003
71
US
Hi,
Hope someone can help me with this problem. I created a form that has a drop down box and a start and end date. Also, on this form I have a command button. I would like when someone clicks the command button, a query would be created based on the info given. Also, a report would be automatically created.
 
Based on the level of this question, I don't think you are ready for code that 'creates a report'. Most of the time, you have a report based on a record source and you want to filter the records displayed in the report. Is this your situation?

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
I don't think that you really want to create a query and report on the fly, but just need to have them display dynamic data based on the form, right?

If that's the case then create your query and reference the form to filter your data:

[Forms]![YourFormName]![YourComboBox]

Then base your report on this query. When this is all running , you can use the DoCmd.OpenReport method to display the report when the user clicks the button on your form.

-Gary
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top