J
JR Hester
AccessXP running on WinXP.
I am tackling another stumbling block along my journey through Access, one
hurdle at a time. I still work primarily in the drag and drop process of
report and form design, so I do not have a full understanding of the VBA
coding syntax and procedures.
I need to add one more piece of data to a working report, rptClassSignIn.
Report is based on query named qrySessionParticipants, sql code included
below.
SELECT tblSessions.StrtDate, tblSessions.StartTime, tblSessions.SessionID,
tblParticipantTrx.*, tblParticipantTrx.TrxID, tblParticipants.*,
tblClasses.*, tblDept.DeptName, tblSessions.Instructor
FROM (tblClasses INNER JOIN tblSessions ON tblClasses.ClassID =
tblSessions.ClassID) INNER JOIN (tblParticipants INNER JOIN
(tblParticipantTrx INNER JOIN tblDept ON tblParticipantTrx.EmpDept =
tblDept.DeptID) ON tblParticipants.EmpID = tblParticipantTrx.EmpID) ON
tblSessions.SessionID = tblParticipantTrx.SessionID
WHERE (((tblSessions.StrtDate)=[date]) AND ((tblSessions.StartTime)=[time]));
I need to add the instructor NAME to my report in the header section. At
present I am working on including internal instructors. Internal instructors
exist in the participants table, not in a separate instructors table. I chose
this method to eliminate duplicate data in database. I have an
ExternalInstructor table for data relating to those instructors who are not
participants(employees of our organization).
Hopefully enough background, Now to the problem at hand. I can’t think
though the process of getting the first and last names from the participant
table that matches the instructorID in the query the report is based on. This
may be one of those cases where only VBA instruction will work. So here is
what I think I want in my report field:
Where qrySessionParticipant!InstructorID=tblParticipant!participantID, print
tblParticipant!EmpFname &†“& tblParticipant!EmpLname
Of course, when I put this line into my control source field and run the
report, I get a dialog box expecting input for this variable. What is the
correct syntax for my request? Am I any where near close? Or would I be
better off to just bite the bullet and add an Interanl instructor table and
duplicate the data for these few personnel from the participants table?
Included basic tables and fields below
Tables:
Participants>> ID, Fname, Lname, DepartmentID,
ParticpantTransactions>> TrxID, participantID, SessionID, enrolled,
attended, completed, grade, departmentID
Sessions>> ID, ClassID, date, time, InstructorID
Classes>> ID,name, description
Department>>ID, name, manager, etc
ExternalInstructors>> ID, Lname, Fname, Contact#, etc
Thanks for any guidance you may offer.
I am tackling another stumbling block along my journey through Access, one
hurdle at a time. I still work primarily in the drag and drop process of
report and form design, so I do not have a full understanding of the VBA
coding syntax and procedures.
I need to add one more piece of data to a working report, rptClassSignIn.
Report is based on query named qrySessionParticipants, sql code included
below.
SELECT tblSessions.StrtDate, tblSessions.StartTime, tblSessions.SessionID,
tblParticipantTrx.*, tblParticipantTrx.TrxID, tblParticipants.*,
tblClasses.*, tblDept.DeptName, tblSessions.Instructor
FROM (tblClasses INNER JOIN tblSessions ON tblClasses.ClassID =
tblSessions.ClassID) INNER JOIN (tblParticipants INNER JOIN
(tblParticipantTrx INNER JOIN tblDept ON tblParticipantTrx.EmpDept =
tblDept.DeptID) ON tblParticipants.EmpID = tblParticipantTrx.EmpID) ON
tblSessions.SessionID = tblParticipantTrx.SessionID
WHERE (((tblSessions.StrtDate)=[date]) AND ((tblSessions.StartTime)=[time]));
I need to add the instructor NAME to my report in the header section. At
present I am working on including internal instructors. Internal instructors
exist in the participants table, not in a separate instructors table. I chose
this method to eliminate duplicate data in database. I have an
ExternalInstructor table for data relating to those instructors who are not
participants(employees of our organization).
Hopefully enough background, Now to the problem at hand. I can’t think
though the process of getting the first and last names from the participant
table that matches the instructorID in the query the report is based on. This
may be one of those cases where only VBA instruction will work. So here is
what I think I want in my report field:
Where qrySessionParticipant!InstructorID=tblParticipant!participantID, print
tblParticipant!EmpFname &†“& tblParticipant!EmpLname
Of course, when I put this line into my control source field and run the
report, I get a dialog box expecting input for this variable. What is the
correct syntax for my request? Am I any where near close? Or would I be
better off to just bite the bullet and add an Interanl instructor table and
duplicate the data for these few personnel from the participants table?
Included basic tables and fields below
Tables:
Participants>> ID, Fname, Lname, DepartmentID,
ParticpantTransactions>> TrxID, participantID, SessionID, enrolled,
attended, completed, grade, departmentID
Sessions>> ID, ClassID, date, time, InstructorID
Classes>> ID,name, description
Department>>ID, name, manager, etc
ExternalInstructors>> ID, Lname, Fname, Contact#, etc
Thanks for any guidance you may offer.