Limit query output

H

Harmannus

Hallo,

Hallo,

I have a subform "fsubScandata" with the field "SID" on it and a Graph Chart
under a Tab. How can i limit the output of this Graph Chart to SID.

I now hardcode the SID ;-( (((qselGraph.SID)=8))

Unbound Object Frame row source:
TRANSFORM Count(*) AS [Count] SELECT qselGraph.Scan FROM qselGraph WHERE
(((qselGraph.SID)=8)) GROUP BY qselGraph.Scan PIVOT qselGraph.Status;


Thanx for any suggestions!

Regards,
Harmannus
 
J

John Viescas

I assume the subform is filtered by some value on the outer form - the Link
Master Fields setting of the subform. If you're using the Graph Applet,
remove the WHERE clause in your row source and set the Link Master and Link
Child properties identical to the subform.

--
John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
 
J

John Spencer (MVP)

Do you want to just type the SID, or do you want to grab it from a control on a
form, OR ????
Assuming you want to get it from a control on an open form, then your SQL
statement would look like the following

PARAMETERS Forms!FormName!SomeControl Long;
TRANSFORM Count(*) AS [Count]
SELECT qselGraph.Scan
FROM qselGraph
WHERE (((qselGraph.SID)= Forms!FormName!SomeControl))
GROUP BY qselGraph.Scan
PIVOT qselGraph.Status;
 
H

Harmannus

Hallo John,

Link Master and Link Child did the trick ;-)

Thanx for the help!

Regards,
Harmannus


John Viescas said:
I assume the subform is filtered by some value on the outer form - the Link
Master Fields setting of the subform. If you're using the Graph Applet,
remove the WHERE clause in your row source and set the Link Master and Link
Child properties identical to the subform.

--
John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
Harmannus said:
Hallo,

Hallo,

I have a subform "fsubScandata" with the field "SID" on it and a Graph Chart
under a Tab. How can i limit the output of this Graph Chart to SID.

I now hardcode the SID ;-( (((qselGraph.SID)=8))

Unbound Object Frame row source:
TRANSFORM Count(*) AS [Count] SELECT qselGraph.Scan FROM qselGraph WHERE
(((qselGraph.SID)=8)) GROUP BY qselGraph.Scan PIVOT qselGraph.Status;


Thanx for any suggestions!

Regards,
Harmannus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top