L
Lynn
I have a main form with a subform. From the subform you
can check a box to open a popup form. The problem is I
can't get the subform to pass the primary key to the
OpenArgs.
Here is the code:
Private Sub ckAltShippingAddr_Click()
Dim stDocName As String
stDocName = "frmAltShippingAddr"
If Me.ckAltShippingAddr = True Then
'DoCmd.OpenForm stDocName, , , , , , "[ReqItemID]=" & Me!
[ReqItemID]
DoCmd.OpenForm stDocName, , , , , , Forms!frmReq.Form!
sbfReqItems.Form.txtReqItemID
End If
End Sub
If I hard code a value it works fine, e.g.,
DoCmd.OpenForm stDocName, , , , , , "2"
can check a box to open a popup form. The problem is I
can't get the subform to pass the primary key to the
OpenArgs.
Here is the code:
Private Sub ckAltShippingAddr_Click()
Dim stDocName As String
stDocName = "frmAltShippingAddr"
If Me.ckAltShippingAddr = True Then
'DoCmd.OpenForm stDocName, , , , , , "[ReqItemID]=" & Me!
[ReqItemID]
DoCmd.OpenForm stDocName, , , , , , Forms!frmReq.Form!
sbfReqItems.Form.txtReqItemID
End If
End Sub
If I hard code a value it works fine, e.g.,
DoCmd.OpenForm stDocName, , , , , , "2"