471,355 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,355 software developers and data experts.

Using Microsoft graphs to Display In Subform

ChaseCox
294 100+
I am using Access 97 to build my Database. I would like when my query is run, to populate a graph from the results of the query. Currently I am using a form to populate the query, and the query is then displaying the resulting records into a datasheet view on a subform. It is the resulting records I would like displayed on the graph. The fields I want on the graph are Prod_Code and Claim_Date. Thanks for the help.
Jan 16 '07 #1
10 3444
NeoPa
32,405 Expert Mod 16PB
I'm not even sure Access does graphing (I'll probably be proved wrong here).
Excel, of course, handles them very well. Might that be a viable solution?
Jan 17 '07 #2
nico5038
3,080 Expert 2GB
Did you try to insert a Graph object on a form ?
Just use your query as the source.

Nic;o)
Jan 17 '07 #3
ChaseCox
294 100+
Yes, I am using the insert graph function, and referencing my query. The problem is that the when the form is opened, the query is run by the graph and produces useless data. I need it to wait until I run the query from the form.
Jan 18 '07 #4
nico5038
3,080 Expert 2GB
Hmm, for this type of timing problems I use to switch from a query to a temp table as a source for the graph. Is changing your query into a maketable query an option ?

Nic;o)
Jan 18 '07 #5
NeoPa
32,405 Expert Mod 16PB
Yes, I am using the insert graph function, and referencing my query. The problem is that the when the form is opened, the query is run by the graph and produces useless data. I need it to wait until I run the query from the form.
I've never used this myself, but if it's like forms and reports then it will have a RecordSource or DataSource property somewhere. Is it possible to leave this empty in the design of the graph and populate it using VBA code as-and-when you're ready for it to work?
Jan 18 '07 #6
ChaseCox
294 100+
No, I can not make it a make table. I will try to tamper with the record source.
Jan 18 '07 #7
ChaseCox
294 100+
This is what the chart lists as the Row Source.

Expand|Select|Wrap|Line Numbers
  1. TRANSFORM Count([PROD_CODE]) AS [CountOfPROD_CODE]
  2. SELECT (Format([CLAIM DATE],"MMM \'YY"))
  3. FROM [Labor Query]
  4. GROUP BY (Year([CLAIM DATE])*12 + Month([CLAIM DATE])-1),(Format([CLAIM DATE],"MMM \'YY"))
  5. PIVOT [PROD_CODE];
Any ideas how I can alter this to do what I am looking for, which is make the graph once I run the query. I am using the Insert chart function.
Jan 18 '07 #8
NeoPa
32,405 Expert Mod 16PB
I'm not sure what you want done differently.
Basically, you put something very like the code that's there already. Changes would be made depending on what you require to be different from the original.
Jan 18 '07 #9
ChaseCox
294 100+
I'm not sure what you want done differently.
Basically, you put something very like the code that's there already. Changes would be made depending on what you require to be different from the original.
It is running without me telling it to, basically. I need to do something similair to chaning its record source on the fly. Any ideas?
Jan 18 '07 #10
NeoPa
32,405 Expert Mod 16PB
I guess I wasn't clear enough.
  1. Save the string that is there already.
  2. Change the design to remove the RecordSource (Change it to empty).
  3. Put in the event procedure (OnClick of Command Button or whatever) an assignment of the string you saved earlier into the RecordSource of the object.
  4. Requery the object (still in the Event Procedure).
Does that explain it?
Jan 18 '07 #11

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by Florian Lindner | last post: by
22 posts views Thread by MJR | last post: by
reply views Thread by MooMaster | last post: by
5 posts views Thread by Deborah V. Gardner | last post: by
1 post views Thread by Panther240 | last post: by
2 posts views Thread by robert.q.johnson | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.