Create a table containing a record for each work date. Just one date/time
field named (say) TheDate, marked as primary key, and save the table as
tblDate.
You can now create an Append query statement that selects the days in the
range the person will be away, and appends them to your table of absences.
If you need help getting the SQL statement to execute, mock up a query,
change it to an Append query (Append on Query menu), type in any literal
employee in the Field row. Once you have mapped the fields, you can switch
to SQL View (View menu) to see an example of the string you need to create.
Ultimately, the code will be:
Dim strSql As String
strSql = "INSERT INTO ...
dbEngine(0)(0).Execute strSql, dbFailOnError
--
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.
"Vinny P" <(E-Mail Removed)> wrote in message
news:F535EE3F-FE8F-4068-AA04-(E-Mail Removed)...
>I am creating an employee attendance database. It will be used by Managers
>to
> log employee vacation time. Entering individual days is not a problem, but
> if
> an employee is taking two weeks, is there a way to enter the range and
> have
> access create records for each date within the range. The current form
> layout
> is as follows, Corp ID, Last Name, Date, Reason Code. For example, an
> employee is taking 1/01/07 to 1/15/07. Is there a way to enter this info
> with
> having to do it individually. And of course, exclude weekends.