E
Ernie Sersen
I have checked multiple postings on Where Condition and have tried several
code strings all to no avail. Here is what I need:
Main Form Name: PNmain (field in a SQL Function pulled from a SQL table)
Main Form Field: PN
Secondary Form Name: PNsec (field in a SQL Function pulled from a SQL table)
Secondary Form Fields: PN, Description, Cost, Vendor, etc
When I click a button on the main form to open the secondary form, I want
the secondary form to display the part details of the main form part number
(PN). I am trying to use the following code from Microsoft which is not
working at present:
Dim stDocName As String
stDocName = "PNsec"
DoCmd.OpenForm stDocName, acFormDS, , [PN] = Forms![PNmain]![PN]
What am I missing? {thanks}
code strings all to no avail. Here is what I need:
Main Form Name: PNmain (field in a SQL Function pulled from a SQL table)
Main Form Field: PN
Secondary Form Name: PNsec (field in a SQL Function pulled from a SQL table)
Secondary Form Fields: PN, Description, Cost, Vendor, etc
When I click a button on the main form to open the secondary form, I want
the secondary form to display the part details of the main form part number
(PN). I am trying to use the following code from Microsoft which is not
working at present:
Dim stDocName As String
stDocName = "PNsec"
DoCmd.OpenForm stDocName, acFormDS, , [PN] = Forms![PNmain]![PN]
What am I missing? {thanks}