I have a main form and subform, with an "Add Records" form opened by a command button on the main form. I want the user to be able to add a record, click on my "Add another record" button and continue until they are done, then hitting the "complete" button which returns them to the main form. But, the first record erases and is replaced by the second, so it is only saving one record.
Here is my code:
Private Sub Additional_Click()
Dim stLinkCriteria As String
' Saves new record and returns to "DocID" field to add another record.
DoCmd.RunCommand acCmdSaveRecord
DoCmd.GoToControl "DocID"
DocID = Null
Revision = Null
Description = Null
DateCompleted = Null
Hours = Null
stLinkCriteria = "[EmployeeID]=" & Me![EmployeeID]
Forms!Employees![Combined Subform].Requery
End Sub
Appreciate any help-Thanks!
Toni
Here is my code:
Private Sub Additional_Click()
Dim stLinkCriteria As String
' Saves new record and returns to "DocID" field to add another record.
DoCmd.RunCommand acCmdSaveRecord
DoCmd.GoToControl "DocID"
DocID = Null
Revision = Null
Description = Null
DateCompleted = Null
Hours = Null
stLinkCriteria = "[EmployeeID]=" & Me![EmployeeID]
Forms!Employees![Combined Subform].Requery
End Sub
Appreciate any help-Thanks!
Toni