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!

Help creating a chart in Access based on QBF technique or filter.

Status
Not open for further replies.

allcarfan

Programmer
Jan 29, 2003
33
0
0
US
I have two fields that I want to be displayed on a form. Field X and Field Y. I want field X and field Y displayed on the chart only for records that match the criteria that I specify for Field Z.

In real time terms: I want to display all open/closed files(X) for all subteams(Y), that are a part of a main team(Z) I know this sounds simple, but here is the trick. I tried creating a Query By Form Technique so on one form I can enter in the Main Team name, and click a button to open another form with a chart on it that is linked back to the query. If I havent lost you yet, here is my problem...The chart that is linked to the original query does not like the criteria for the Main team name..forms![form1]![team]. It says it is not a valid expression. I can run a simple query to get the results that I am looking for and it displays exactly what I need...It just wont chart properly.

Is there a way i can run a query that automatically dumps it to a temporary table that the chart can be created from, then when the forms are closed, the table clears itself? Kind of like an array?

If you need more information, or cant understand what the heck I am talking about (i barely understand it myself when i reread this), please post a response and I will get right back to you.

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