Hi,
I am trying to create a command button that:
1. Opens the form as selected from a combobox,
2. Creates a new record, and
3. Inserts the EmployeeID automatically.
But when I click on the button I get the error message: "Applicatio n-defined or object-defined error." After troubleshooting the code, I've narrowed problem down to line 5, but now I don't know how to fix it.
Your help would be much appreciated.
dstorms
I am trying to create a command button that:
1. Opens the form as selected from a combobox,
2. Creates a new record, and
3. Inserts the EmployeeID automatically.
Code:
Dim stItem As String Dim stDocName As String Dim stLinkCriteria As String stItem = Forms!frmDigitalEquipment.CategoryList stDocName = "frmDE" & stItem stLinkCriteria = "[EmployeeID]=" & Forms!frmDigitalEquipment.EmployeeID DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormAdd
Your help would be much appreciated.
dstorms
Comment