So I have a table with dates worked and hours for each empl. I also created a table with dates far into the future. I think I need a query that joins the two tables and puts all dates for the date range - that will be prompted. added to the table of employee time worked.
Does anyone have any ideas how to join these tables and get all dates for each employee in the two week range that will be prompted?
First table name Dates has only 1 column with dates way into the future.
Second table name TotHoursQuery (which is acutally a query) has Empl Name, Date worked, and hours worked.
The code I have so far works sort of, but prompts for empl_name and cal_date (for some reason) - and the expected end date, but no start date. If I put nothing in the prompts except put date in end date, it comes back with the original data that is in TotHoursQuery and adds the empl_name and cal_date fields to the view, with nothing in them. My code below..
Expand|Select|Wrap|Line Numbers
- SELECT *
- FROM (SELECT DISTINCT Nested.empl_name, Nested.cal_date
- FROM Dates, TotHoursQuery
- WHERE Nested.cal_date between [start date] and [end date]) AS Nested
- LEFT JOIN TotHoursQuery
- ON (Nested.cal_date = TotHoursQuery.[Start Date])
- AND (Nested.empl_name = TotHoursQuery.[Full Name]);