G
Guest
In my query I am trying to relate a PRStaff field containing an alpha list of
names and a DayNum field containing the numeric value of the days of a
selected month (with weekends filtered out).
For each different DayNum, I need the PRStaff field to display one name.
When the PRStaff names run out I want them to start over. I want thePRStaff
name list to repeat until there is a name that corresponds to each day of the
month. My ultimate goal is to display a calendar with one name showing for
each work day of the month.
Here's an example of the query results I want if I have 3 names in the
PRStaff list:
PRStaff DayNum
Name1 1
Name2 2
Name3 3
Name1 4
Name2 5
Name3 6
Name1 7
Right now my query causes each DayNum to repeat the same number of times as
there are names in the PRStaff field:
PRStaff DayNum
Name1 1
Name2 1
Name3 1
Name1 2
Name2 2
Name3 2
Name1 3
Name2 3
Name3 3
Name1 4
Name2 4
Name3 4
Here's my SQL statement:
SELECT qryPhoneReliefList.PRStaff, Q_ApptsReportMain.YearNum,
Q_ApptsReportMain.MonthNum, Q_ApptsReportMain.DayNum,
Q_ApptsReportMain.WkDay, Q_ApptsReportMain.CalDate
FROM qryPhoneReliefList, Q_ApptsReportMain
WHERE (([Q_ApptsReportMain]![WkDay]<>1 And [Q_ApptsReportMain]![WkDay]<>7));
I know my mistake is basic and obvious, but I can't see it for the life of
me. I apologize if this has been answered before, but I've searched the
discussion group and haven't been able to find the answer.
Thank you in advance for any help you can provide.
names and a DayNum field containing the numeric value of the days of a
selected month (with weekends filtered out).
For each different DayNum, I need the PRStaff field to display one name.
When the PRStaff names run out I want them to start over. I want thePRStaff
name list to repeat until there is a name that corresponds to each day of the
month. My ultimate goal is to display a calendar with one name showing for
each work day of the month.
Here's an example of the query results I want if I have 3 names in the
PRStaff list:
PRStaff DayNum
Name1 1
Name2 2
Name3 3
Name1 4
Name2 5
Name3 6
Name1 7
Right now my query causes each DayNum to repeat the same number of times as
there are names in the PRStaff field:
PRStaff DayNum
Name1 1
Name2 1
Name3 1
Name1 2
Name2 2
Name3 2
Name1 3
Name2 3
Name3 3
Name1 4
Name2 4
Name3 4
Here's my SQL statement:
SELECT qryPhoneReliefList.PRStaff, Q_ApptsReportMain.YearNum,
Q_ApptsReportMain.MonthNum, Q_ApptsReportMain.DayNum,
Q_ApptsReportMain.WkDay, Q_ApptsReportMain.CalDate
FROM qryPhoneReliefList, Q_ApptsReportMain
WHERE (([Q_ApptsReportMain]![WkDay]<>1 And [Q_ApptsReportMain]![WkDay]<>7));
I know my mistake is basic and obvious, but I can't see it for the life of
me. I apologize if this has been answered before, but I've searched the
discussion group and haven't been able to find the answer.
Thank you in advance for any help you can provide.