Dynamic Graph/chart

GeoByte

New member
Local time
Today, 13:11
Joined
Dec 19, 2006
Messages
8
Hy Folks,
I'm building a great form with a subform holding the dataview of a query. On the main form I have some combo's, whitch act as filters for the subform.
Now i added a pie-chart (ms-graph) whitch responds to the recordset on the subform. It works like a charm without any VB.
Now I want the user to be able to select the chartfield, so I added a listbox (GraphField) with fieldnames.

The problem..
I can't get the rowsource for the graph right.

This works good..
SELECT [Lamptype] ,Count(*) AS [Aantal] FROM [qryFilterMastzoekFormulier] GROUP BY [Lamptype];

Substituting the fieldname with the control-name of the listbox doesn't seem to work... i.e. :confused:
SELECT GraphField ,Count(*) AS [Aantal] FROM [qryFilterMastzoekFormulier] GROUP BY GraphField;
Neither does..
SELECT GraphField.Value ,Count(*) AS [Aantal] FROM [qryFilterMastzoekFormulier] GROUP BY GraphField.Value;

Can anybody help me on track?
Many Thanks.
 

Users who are viewing this thread

Back
Top Bottom