Opening a report

prmitchell

Registered User.
Local time
Tomorrow, 05:32
Joined
Jan 2, 2013
Messages
58
I wish to be able to run the one report from either of two combo boxes on a form and the query/report runs with the value from one or the other combo box.
Is this possible and if so how?
 
The short answer is yes. However the specifics will require a little more information on your part.
 
Thanks for the reply John.
The structure involves 4 tables (more in the whole system but enough for this explanation) - involving tracking whether participants attend seminars
One job has many seminars
One seminars has many attendances
One participant has many attendances

attendances being the transaction table

The report shows the attendances (or not) of participants at seminars - and this can be either for a whole job (involving many seminars showing participants) or just for the one seminar.

So the combo boxes on the form involve selecting either a Job ID or Group ID and opening the query/report

the sql is (only the first line of the where is different)

By selecting the SeminarID
SELECT Jobs.[JobID], Jobs.[Title], Seminars.[SeminarID], Seminars.Date, , Seminars.Time, Participants.[Name]
FROM Jobs, Seminars, Attendances, Participants
WHERE (((Seminars.[SeminarID])=[Forms]![Main]![ SeminarID])) AND
Attendance.[PartID]=Participants[PartID] AND
Seminars.[SeminarID] =Attendance.[SeminarID]= AND
Jobs.[JobID]= Seminars[JobID]
Or if selecting the JobID
SELECT Jobs.[JobID], Jobs.[Title], Seminars.[SeminarID], Seminars.Date, , Seminars.Time, Participants.[Name]
FROM Jobs, Seminars, Attendances, Participants
WHERE (((Jobs.[JobID])=[Forms]![Main]![JobID])) AND
Attendance.[PartID]=Participants[PartID] AND
Seminars.[SeminarID] =Attendance.[SeminarID]= AND
Jobs.[JobID]= Seminars[JobID]
 
This is similar to your other thread in that you require a search form and a query with the criteria but the command button opens the rep:mad:ort based on the query

ie one query , one report, multiple criteria in the query
Brian
 

Users who are viewing this thread

Back
Top Bottom