Full Version: various counts from various queries with parameter inputs?
UtterAccess Discussion Forums > Microsoft® Access > Access Reports
daveleggy
Hi
any help on the following would be well appreciated I have tried different methods but cannot achieve what I require


I have several queries I want to report from , and each of these queries needs to be driven by some parameters

when I select the criteria by paremeters on the query they didn't work so I did it on the report call

testsummary2 contains 3 fields
MACHINE_NUMBER,DATE_REPORTED, Count of DateReported from query1

for example
strSQL = "MACHINE_NUMBER "
'excude department build up a string from a list box
' for example "Not In ('MISC','FRANCE')

strSQL = strSQL & excludeDepartment()

DoCmd.OpenReport "testSummary2", acViewPreview, , strSQL

ok sa far so good this works

however I want to also include data from another query lets call it query2 and this also has A field with the same name as query1 (MACHINE_NUMBER)
MACHINE_NUMBER,DATE_CLEARED

How can I control the data parametized when both queries have thae same field and they are not related in any way
DoCmd.OpenReport "testSummary2", acViewPreview, , strSQL


I hope this makes sense
If not let me know and I will break it down again

regards

Dave
MCzopek
Dave,

Could you base the report on a new query, which itself has the two existing queries in it? You would then drag Machine_Number from the first query over to Machine_Number of the second query to create a link between the two queries? You should then be abe to get the data from the first query and the data from query2.


Mike
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.