If you wish to do so, yes. You would need an auxilary table (tblNumbers) with
one field (TheNumber) contains numbers from 1 to at least 31. Then you could
use something like the following. You would enter any date in the month you
were interested in.
INSERT INTO Muster (EmpID, MusterDate)
SELECT EmpId
, DateAdd("d",[tblNumbers].[TheNumber]-1,[Enter Start Date]) as Today
FROM Emp_Name , tblNumbers
WHERE [tblNumbers].[TheNumber] Between 1 and
Day(DateSerial(Year([Enter Start Date]),Month([Enter Start Date])+1,0))
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
John Spencer wrote:
> If you want to create records in Muster for a specific date, then you
> might use an append query.
>
> INSERT INTO Muster (EmpID, MusterDate)
> SELECT EmpId, Date() as Today
> FROM Emp_Name
>
> Or you can use a query as the source. You need to give a bit more
> detail as to the structure of your tables. I am guessing that you have
> an EmpID field in both tables and a MusterDate field. You can construct
> a query based on the two tables that will show EmpID and a blank field
> for the musterdate.
>
> John Spencer
> Access MVP 2002-2005, 2007-2009
> The Hilltop Institute
> University of Maryland Baltimore County
>
> manolakshman wrote:
>> I have 2 tables Emp_Name & Muster. For every single day i need to pick
>> all the entries in EMp_name. Is there any way to program it, so that I
>> dont need to copy and paste it every time
|