What i need to do is when adding a new employee i need to add a record to the "access" table for each record in the container table. that would basically default the new employee's access to each container.
I think the following code in my addemployee form_Load event should detect if they have been added. but i'm having trouble with figureing out how to proceed on what needs to done.
Expand|Select|Wrap|Line Numbers
- Dim emp As String
- emp = "employee = " & Staffadd.ID
- If DLookup("[Containerstring]", "access", emp) = Null Then
what i need help with is:
A) I don't know how to tell how many entreis are in the containers table.
and
B) I don't know how to programitacly add records to a table.
With this information i should be able to simply loop through the containers table and add a record to the access table for the new employee each record in the containers table.