Forum Discussion
itsmatta
Jun 19, 2024Copper Contributor
Subform updating table, but not when you open form individually to input data
I have an employee form connected to the employee table. I have a contacts form connected to the Contacts Table. When I drop in the Contact Form into the Employee form and type a few notes. It update...
George_Hepworth
Jun 20, 2024Silver Contributor
That's how forms and subforms are designed. They must work together. You should probably just stick to the original interface design approach using the Employee form with the subform.
itsmatta
Jun 21, 2024Copper Contributor
I figured it out. First I had the ID missing on the other form. So when clicking the button to open the form, it couldn't find the correct employee ID. Second I added VBA to make this work successfully:
Option Compare Database
Option Explicit
Private Sub Contact_Click()
DoCmd.OpenForm "ContactForm", , , "EmployeeID=" & EmployeeID
End Sub