Hello,
From a subform I'm opening a popup form to a new record. Except the new record must insert the CustFK value. Right now its just filtering the record set. How can I insert the CustID value in the DoCmd.GoToRecord , , acNewRec form?? see VBA code below.
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "ComDetail"
stLinkCriteria = "[CustFK]=" & Me![CustID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.GoToRecord , , acNewRec
From a subform I'm opening a popup form to a new record. Except the new record must insert the CustFK value. Right now its just filtering the record set. How can I insert the CustID value in the DoCmd.GoToRecord , , acNewRec form?? see VBA code below.
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "ComDetail"
stLinkCriteria = "[CustFK]=" & Me![CustID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.GoToRecord , , acNewRec