Adding New Child Record (1 Viewer)

gregoryagu

Registered User.
Local time
Today, 06:22
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:

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
 

gregoryagu

Registered User.
Local time
Today, 06:22
Joined
May 7, 2009
Messages
29
Thanks. I finally figured this out using a macro.

Hope you get your issue figured out. I looked it over, but it looks like you have many good suggestions already.

Greg
 

Users who are viewing this thread

Top Bottom