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

Macro to Run Queries then Report

Status
Not open for further replies.

Legends77

Technical User
Jan 18, 2009
57
US
Currently have a macro that runs 3 querys then the report, however each query ask for a set of criteria between [beginingmonth] and [endingmonth] and [fiscal year]. Currently entering the same data 3 times as each query ask for it (2 make table querys) and a select query that brings it all together.

Tried mulitiple versions of links and joins to avoid the make tables but they are required.

Is there away I can enter this data once? I have created a table called "criteria" that has beginingmonth / endmonth / ficalyear. However not having any luck linking because the it is a "between" beginingmonth and endmonth, so can not link those fields.

Any suggestions are welcomed and greatly appreciated.
 
We probably need to see your queries and get some idea about the tables. There are occasions where a MAKE TABLE is required but often the query that generates the MAKE TABLE can be used directly (without the "INTO Sometable" clause) in another SQL statement.

If you have a table with beginingmonth / endmonth / ficalyear, show us how you are attempting to link that table to the ones that need to observe the BETWEEN condition.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top