I am having a hard time thinking how to explain this so I apologize if I leave out important info. I have a form with subform. My main form has the primary key EmployeeID (autonumber field). my subform has foreign key EmpID (it's a lookup field on the related table)
What I want to do is when I create a new record in the subform by entering a date (I have a date field) I want the empID field to get the empID from the related main form.
I'd attach a screen shot if I could figure out how to do that.
I've tried adding the following code (or forms of this code) to the OnDirty event in the subform:
Code:
Forms![sbfTimeSheets]![EmpID] = Me.EmpID
but alas I get an error that "access can't find the form 'sbfTimeSheets' referred to... " and I know that's the right name of that form