Automate Records

C

channell

If I have employees who work for me, how do I automate my system to
automatically create new records for all my employees on workdays
(Monday-Friday)? I am sure there are a few way to go about this, what would
you suggest? Thank you thank you very much in advance!

-Scott Channell
 
P

pietlinden

If I have employees who work for me, how do I automate my system to
automatically create new records for all my employees on workdays
(Monday-Friday)?  I am sure there are a few way to go about this, what would
you suggest?  Thank you thank you very much in advance!

-Scott Channell

not sure *why* you want this, but...

If you have a table of dates or numbers (1-31), so you can choose a
starting day number and an ending one , e.g. 5-9, then you can create
a cartesian product and append it somewhere.

SELECT Employee.EmployeeID, Workdays.WorkdayDate
FROM Employee, Workdays
WHERE Employee.Active=True
AND Workdays.WorkdayDate BETWEEN 1 and 5;

something like the above will return a cartesian product of every
possible combination of (EmployeeID, WorkDayDate) where WorkdayDate is
between 1 and 5.

So then you just turn that into an append query and you're good to go.
 
C

channell

Thanks! Ok, I will give that a whirl. Now, I have a somewhat related
question, and I hope that you can help me with this... I was looking to do
this instead:

Instead of having it automated like that, can I, from a select list box,
select a number of employees, and hit an "OK" button or something like that
to create new records for my employees' WorkDates?

I am not too sure how to go about this, and if there is an append query
involved, I would need a little more detailed instruction because I have very
limited knowledge on append queries.

Thank you so much, and I assume you have your email address as your name so
I can directly contact you?

I will give this a shot, but I would prefer to do what I have just
explained. Thanks a lot.

Tables:

tblEmployees:
EmployeeID (PK)
Employee Name
....So forth...

tblDailyInfo:
DailyInfoID (PK)
EmployeeID (Linked)
WorkDate
....So forth...

-Scott Channell

(e-mail address removed)
 
A

a a r o n . k e m p f

I'd start with running things like this in SQL Server.

with Access, it is impossible to 'run code every day'; but in SQL
Server this is built in functionality
 
B

BruceM

Ignore Aaron, if you are not already.

channell said:
Thanks! Ok, I will give that a whirl. Now, I have a somewhat related
question, and I hope that you can help me with this... I was looking to do
this instead:

Instead of having it automated like that, can I, from a select list box,
select a number of employees, and hit an "OK" button or something like
that
to create new records for my employees' WorkDates?

I am not too sure how to go about this, and if there is an append query
involved, I would need a little more detailed instruction because I have
very
limited knowledge on append queries.

Thank you so much, and I assume you have your email address as your name
so
I can directly contact you?

I will give this a shot, but I would prefer to do what I have just
explained. Thanks a lot.

Tables:

tblEmployees:
EmployeeID (PK)
Employee Name
...So forth...

tblDailyInfo:
DailyInfoID (PK)
EmployeeID (Linked)
WorkDate
...So forth...

-Scott Channell

(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top