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!

Dump records from a query to a temporary table?? Possible?

Status
Not open for further replies.

allcarfan

Programmer
Jan 29, 2003
33
0
0
US
I am not sure if this is possible...

I want to run a query and dump all the records from the query to a temporary table, and then design a chart from that temporary table. When the query or graph is closed, I would like the table to clear itself of all data until the next query is run. Please Help

shane
 
Figured it out. Sometimes I have to go around my butt to get to my elbow, but here goes...

I set up a 'make-table' query with the fields that I wanted queried. Under one of the criteria I have code written for my query by form technique. The code is forms![form1]![team]. That is is for the query.

Next I created a form named Form1 with one textbox on it. The textbox name is Team. This form also has a control button on it that runs a macro (graphmacro) and opens form2.

I created a macro (graphmacro) that will run the maketable query and open form2.

I created a form2. On this form, I created a chart that has its data based on the table that is created when the runquery table is opened.

When I run another query, the old data in the table is deleted automatically by access and updated with the new query information.

Now, I have a form that I can enter in a "team" name on, click a control button and it opens a graph with the information that I need.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top