A
ant1983
Cant quite wrap my head around this one...
I've created a Training Database that is used to capture training bookings.
I want to create a “Training Calendar†so basically want to show the course
names (there are only 6) as column headings then have all the dates of the
year on the left as row headings (not just the training dates but rather
every single day of the year as it is going to be a calendar at the end of
the day and then have the Facilitators name where it crosses.
So I thought a cross tab query was the way to go and so I created it and it
works great except for the following problem:
Because the sessions are either a 1 day session or two day sessions I cant
quite figure out how I would show the facilitators name on both days. The
cross tab query works but shows the facilitator’s name on the first day but
not the second.
Here’s what ive done:
Step 1: I created a table called tblDates with only one field “Dates†– I
populated that field with each day of the year so it is 365 entries (this is
the only way I could figure out how to use this later as a row heading so
don’t laugh
Step 2: I created a query called qryCalendar and added tblDates as well as
tblTrainingSessions (tblTrainingSession are all of the actual training
sessions available including these fields (just some of them:
autTrainingSessionID, txtCourse (the course name), dateStartDate, dateEndDate)
Step 3: I linked the “Dates†from tblDates with dateStartDate in
tblTrainingSessions.
Step 4: I added “Dates†to the query and then added all fields from
tblTrainingSession and saved it as qryCalendar and Closed it.
Step 5: Created a cross-tab query called qryCalendar_Crosstab with
qryCalendar and tblFacilitator (where I capture all facilitators names and
other details) and in this query I added: “Dates†as the Row Heading,
txtCourse as the Column Heading and txtName (from tblFacilitator) as the
Value (Total: First)
The result is my calendar but the problem is it show the facilitators name
on day 1 but not day two. Now I know why – Its because in qryCalendar I
linked “Dates†with dateStartDate and not with dateEndDate but I cant quite
figure out how to do it differently? ïŠ
(Hows that for a detailed question? )
Thanks for the help and reading my very long question.
ant1983
I've created a Training Database that is used to capture training bookings.
I want to create a “Training Calendar†so basically want to show the course
names (there are only 6) as column headings then have all the dates of the
year on the left as row headings (not just the training dates but rather
every single day of the year as it is going to be a calendar at the end of
the day and then have the Facilitators name where it crosses.
So I thought a cross tab query was the way to go and so I created it and it
works great except for the following problem:
Because the sessions are either a 1 day session or two day sessions I cant
quite figure out how I would show the facilitators name on both days. The
cross tab query works but shows the facilitator’s name on the first day but
not the second.
Here’s what ive done:
Step 1: I created a table called tblDates with only one field “Dates†– I
populated that field with each day of the year so it is 365 entries (this is
the only way I could figure out how to use this later as a row heading so
don’t laugh
Step 2: I created a query called qryCalendar and added tblDates as well as
tblTrainingSessions (tblTrainingSession are all of the actual training
sessions available including these fields (just some of them:
autTrainingSessionID, txtCourse (the course name), dateStartDate, dateEndDate)
Step 3: I linked the “Dates†from tblDates with dateStartDate in
tblTrainingSessions.
Step 4: I added “Dates†to the query and then added all fields from
tblTrainingSession and saved it as qryCalendar and Closed it.
Step 5: Created a cross-tab query called qryCalendar_Crosstab with
qryCalendar and tblFacilitator (where I capture all facilitators names and
other details) and in this query I added: “Dates†as the Row Heading,
txtCourse as the Column Heading and txtName (from tblFacilitator) as the
Value (Total: First)
The result is my calendar but the problem is it show the facilitators name
on day 1 but not day two. Now I know why – Its because in qryCalendar I
linked “Dates†with dateStartDate and not with dateEndDate but I cant quite
figure out how to do it differently? ïŠ
(Hows that for a detailed question? )
Thanks for the help and reading my very long question.
ant1983