G
GoCoogs
I have a form where the user can create an activity that staff are
required to complete. I have created a lookup table called
ActivityStaff that will contain which staff members are responsible
for which activities.
After the activity has been created it has an ActivityID in the
Activity table. The staff are listed in the Staff table. I want to
Insert this activityID and the staffid of the staff members
responsible for the activity into the ActivityStaff column. I tried
the following but it did not work.
strActivityID = DMax("ActivityID", "Activity")
strSQL = "INSERT INTO ActivityStaff(ActivityID, StaffID) Values
(strActivityID, (SELECT StaffID from Staff where Active = 1))"
CurrentDb.Execute (strSQL)
Any suggestions? Would a temporary table be better?
Thanks,
Blake
required to complete. I have created a lookup table called
ActivityStaff that will contain which staff members are responsible
for which activities.
After the activity has been created it has an ActivityID in the
Activity table. The staff are listed in the Staff table. I want to
Insert this activityID and the staffid of the staff members
responsible for the activity into the ActivityStaff column. I tried
the following but it did not work.
strActivityID = DMax("ActivityID", "Activity")
strSQL = "INSERT INTO ActivityStaff(ActivityID, StaffID) Values
(strActivityID, (SELECT StaffID from Staff where Active = 1))"
CurrentDb.Execute (strSQL)
Any suggestions? Would a temporary table be better?
Thanks,
Blake