Creating Multiple records in a table at once

P

Pele

I have created a form (ADD RECORD) that will be used for doing 2 things when
a command button is pressed. The fields on the form are:

Job Title, Schedule, Shift, Start Week, End Week, Head Count#, ST, OT and DT

The two things the command button will do are:
1) Creating one record in one table (HEADCOUNT) and enter values from
textboxes into the table. The fields needed by the table are Job Title,
Schedule, Shift, Start Week, End Week, Head Count#.
2) The command button should also immediately create multiple records in
another table (HEADCOUNT_EXTRA). The required textboxes by this table (from
the form) are ST, DT and OT. The table Headcount_extra has only 3 fields ST,
OT and DT.

Note that the number of multiple records required to be added to the table,
HEADCOUNT_EXTRA, will depend on the equation below:

[END WEEK] - [START WEEK] +1

e.g. 52 records will be created if you evaluate 52-1+1

Can anybody help develop an event procedure that will do this. I only use
macros in access and I am not savvy enough to write event procedures from
scratch.

Pele
 

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

Top