Multiple records generated on one form

G

Guest

For my daily line up I have been entering one employee at a time in the
"login" tbl. I was curious if I could create a form that would allow me to
activate 7 employees and one command button to generate the time for all 7.
Example have a form with seven entery slots and one command button but I need
to generate the 7 records with one employee per record with the same time for
all records....

Thanks Ms. Jen
 
M

Michel Walsh

Hi,


You can append multiple records with an SQL statement like

INSERT INTO tablename(listOfFields) SELECT listOfFieldsOrExpression
FROM otherTable WHERE someCondition


such as

INSERT INTO schedule( EmpID, slot) SELECT EmployeeID, 4 FROM
Employees WHERE selected=true


that will add all EmployeeID, and the number 4, from table Employees where
the condition occurred (here, where the field name "selected" has its value
equal to true).



Hoping it may help,
Vanderghast, Access MVP
 

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