-----Original Message-----
Your data to show doesn't match your table data. However, I would create a
table of dates tblDates with a single date field named ADate and values from
8/1 to whatever. Then create a union query based on your table (tblEmpSched)
=== quniEmpSchedule======================
SELECT EmployeeName, StartRangeDate, EndRangeDate, 1 as DOW
FROM tblEmpSched
WHERE SundayBox=True
UNION ALL
SELECT EmployeeName, StartRangeDate, EndRangeDate, 2 as DOW
FROM tblEmpSched
WHERE MondayBox=True
UNION ALL
SELECT EmployeeName, StartRangeDate, EndRangeDate, 3 as DOW
FROM tblEmpSched
WHERE TuesdayBox=True
UNION ALL
SELECT EmployeeName, StartRangeDate, EndRangeDate, 4 as DOW
FROM tblEmpSched
WHERE WednesdayBox=True
UNION ALL
SELECT EmployeeName, StartRangeDate, EndRangeDate, 5 as DOW
FROM tblEmpSched
WHERE ThursdayBox=True
UNION ALL
SELECT EmployeeName, StartRangeDate, EndRangeDate, 6 as DOW
FROM tblEmpSched
WHERE FridayBox=True
UNION ALL SELECT EmployeeName, StartRangeDate, EndRangeDate, 7 as DOW
FROM tblEmpSched
WHERE SaturdayBox=True;
Then create a query with quniEmpSchedule and tblDates
==========================================
SELECT EmployeeName, ADate
FROM quniEmpSchedule, tblDates
WHERE ADate Between [StartRangeDate] And [EndRangeDate] AND
Weekday([ADate])=[DOW]
ORDER BY ADate;
--
Duane Hookom
MS Access MVP
Jeff said:
ClientName, EmployeeName,StartRangeDate, EndRangeDate,
SundayBox=No, MondayBox=yes, TuesdayBox=No,
WednesdayBox=Yes, ThursdayBox=No, FridayBox=Yes,
SaturdayBox=No.
Data to show: (using 8-1-03 thru 8-31-03 as the range)
John Smith, Jane Doe,8-4-03
John Smith, Jand Doe,8-6-03
John Smith, Jand Doe,8-8-03
John Smith, Jane Doe,8-11-03
John Smith, Jand Doe,8-13-03
John Smith, Jand Doe,8-15-03
John Smith, Jane Doe,8-25-03
John Smith, Jand Doe,8-27-03
John Smith, Jand Doe,8-29-03
The form resembles the Weekly recurrence form in
Microsoft Outlook.
.
Duane,