The simplest way to do this would be to create a table with all working
dates in it. Omit (or delete) weekends and public holidays if desired. You
can then use the Unmatched Query Wizard to find the records in this table
that have no match in your other table.
Create a table with one Date/Time field named TheDate. Mark the field as
primary key. Save the table with the name tblDate. You can now use the
function below to populate it with all the dates you want.
Function MakeDates(dtStart As Date, dtEnd As Date) As Long
Dim dt As Date
Dim rs As DAO.Recordset
Set rs = DBEngine(0)(0).OpenRecordset("tblDate")
With rs
For dt = dtStart To dtEnd
.AddNew
!TheDate = dt
.Update
Next
End With
rs.Close
Set rs = Nothing
End Function
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"BerkshireGuy" <be*************************@yahoo.comwrote in message
news:11**********************@g4g2000hsf.googlegro ups.com...
>I have a Access database that should have data for each weekday of the
year. There is a field called DateDownloaded, which should have at
least one record for each weekday of the current year.
Does anyone know of existing code that would check to make sure each
weekday has at least one record and if not, write that date to a temp
table or output to a report?
Thanks
Brian