Help Please Populate Table (1 Viewer)

liam9911

New member
Local time
Today, 13:01
Joined
Dec 6, 2014
Messages
5
Hi can anyone help me

Table [Staff_Details]
Staff ID PK , Staff Name

Table [Rota]
Shift ID PK , Staff ID FK , Staff Name , Date, Time In, Time Out

I am wanting on my form for me to select the date and click create and have the form create records and each record to have the Staff ID and the current date automatically inserted

On my form i have a drop down box in each record with the staff id and name that has been linked to my staff details table.

I do not want to manually create a record in my form and have to manually create a new record for each member of staff that i have for each of the days as this would take some time.

for example i want to be able to select create and the 13 staff that i have in my drop down box the form automatically creates 13 new records each with the staff id already inserted

any help would be appreciated
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 05:01
Joined
Aug 30, 2003
Messages
36,133
Create an append query that gets values from the staff table plus a date from a form, and execute it from the form.

The rota table should not have the staff name, just the ID.
 

plog

Banishment Pending
Local time
Today, 07:01
Joined
May 11, 2011
Messages
11,669
I'd fix your tables first.

Staff Name does not need to be in Rota.

You should not have 3 date/time fields, but 2--store the date with the time in and time out.
 

liam9911

New member
Local time
Today, 13:01
Joined
Dec 6, 2014
Messages
5
Create an append query that gets values from the staff table plus a date from a form, and execute it from the form.

The rota table should not have the staff name, just the ID.


Thanks for the quick reply.
i have done that but when i run the query it then creates two records for each staff.

any ideas as to why it would do that?
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 05:01
Joined
Aug 30, 2003
Messages
36,133
Are you selecting from the staff table? You should be, and you'd only get two per staff if that table had two per staff.
 

Users who are viewing this thread

Top Bottom