gregoryagu
Registered User.
- Local time
- Today, 11:40
- Joined
- May 7, 2009
- Messages
- 29
Access 97
I have a Parent Form named Employees. I have a second form which is brought up when clicking a button. The second form is called frmAbsences. When the button is clicked I want to create a new Absence, and I need the EmployeeID already populated along with the EmployeeName.
Right Now, I am using the following code to open the form in add mode:
How do I use the variables to populate the data in the now open form? Is there another way I should be doing this?
Thanks,
Greg
I have a Parent Form named Employees. I have a second form which is brought up when clicking a button. The second form is called frmAbsences. When the button is clicked I want to create a new Absence, and I need the EmployeeID already populated along with the EmployeeName.
Right Now, I am using the following code to open the form in add mode:
Code:
Dim employeeNo As Integer
employeeNo = Me.EmployeesID
Dim employeeName As String
employeeName = Me.Emp
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmAbsences"
DoCmd.OpenForm stDocName, , , , acFormAdd
How do I use the variables to populate the data in the now open form? Is there another way I should be doing this?
Thanks,
Greg