Creating Multiple Record



I was curious to find out how to create multiple records for an employee. I
want to be able to select an employee and schedule vacations and multiple
days off from work.

Here is what my tables look like:

Employee ID (PK)

DailyInfo ID (PK)
....and so forth

Here is what I envision:

I select an employee from a combo box. Below that is another combo box with
a list of multiple reasons why someone would need time off. I select a
reason. I enter a start date and an end date for vacations. I need an "OK"
button at the bottom. Once I click it, it would created a record for every
day that person is on vacation or absent.

Thanks for your help in advance! if you need to email me, please do so at
(e-mail address removed). Thanks!



Add the Employee ID to tblDailyInfo (number format)
Link the tables in the relationship window.


I am sorry... I do have EmployeeID in tblDailyInfo. I am not sure where to
go from there. Thanks!



Open the relationship window and drag the field from tblEmployee over the
the same field in tblDailyInfo and create the relationship. I would suggest
the you use integrety (so you can't have days off with no-one taking them ??)

Next create a query with both tables in the design grid (the relationship
will show here as well).
Drag the fields into the query that you want from the table then create your

Next create a new
Next - open the form in design view and (use the wizard toolbox) add a a
combo to give you the items you want (base it on a query that the wizard will
create for you).

If you want to casscade the combo (so that when you select an employee only
they will show in the next) ensure you refer to the 1st combo in the query
the 2nd is based on (use the build option in the criteria row).

Hope this makes sence.

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