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

HOW TO CREATE A FORM TO GENERATE REPORT WITH OPTIONS OF USERS

Status
Not open for further replies.

hoprogramevaluator

Technical User
Sep 4, 2008
1
CA
i AM WORKING ON CREATING A FORM WHICH IS LINKED TO A QUERY. THE QUERY IS TO GENERATE A REPORT BASED ON SELECTED TEAM NAME OR DATE. BOTH THE SELECTION OF THE TEAM NAME AND DATE CAN BE ENTERED BY THE THE USER AT THE POINT WHEN HE ACCESS THE FORM AND KEY INTO IT BY HIMSELF (THAT MEANS HE CAN CHOOSE WHICH TEAM HE WANTS THE REPORT IS BASED ON AND DATE. THE TEAM NAME IS DEFINED AND SAVED IN THE TABLES.
 
Hi,

Please don't SHOUT your question...if that is what it is.

In the query window you are going to need to refer back to the values on the form as the conditions for your query.

eg. [Forms]![YourFormName]![YourControl]

Similar logic for dates

HTH.

Peter.

Remember- It's nice to be important,
but it's important to be nice :)
 
Like Peter said you can put references to control values as criteria for your query, or you can use a "where" clause in your docmd.open report. Ex:

DoCmd.OpenReport "Sales Report", acPreview,, "companyName = '" & me.companyName & "'"

I prefer the latter because it provides a more flexibility and error checking. Especially if you have multiple criteria. With only Team and Date you may find it as easy to go with the original suggestion.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top