Good afternoon,
I am having difficulties working the below:
I have a main form (Invoices) with subform (InvoiceDetails) and a separate searchform (ProdSearch)
I now would like to be able when double click the product found via the search form to be added as a new record on my subform.
Both the searchform and the subform have Productkey as primarykey.
Private Sub SearchResults_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "InvoiceDetails"
stLinkCriteria = "[]=" & Me![SearchResults]
DoCmd.gotorecord "Invoicedetails", , , , acNewRec
End Sub
So far nothing works unfortunately.
I have a seprate option with DoCmd.openform for my customers and that works fine.
Hope someone can help.
Thanks!
Vincent
I am having difficulties working the below:
I have a main form (Invoices) with subform (InvoiceDetails) and a separate searchform (ProdSearch)
I now would like to be able when double click the product found via the search form to be added as a new record on my subform.
Both the searchform and the subform have Productkey as primarykey.
Private Sub SearchResults_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "InvoiceDetails"
stLinkCriteria = "[]=" & Me![SearchResults]
DoCmd.gotorecord "Invoicedetails", , , , acNewRec
End Sub
So far nothing works unfortunately.
I have a seprate option with DoCmd.openform for my customers and that works fine.
Hope someone can help.
Thanks!
Vincent