Hello,
I am having issues passing a text box field's criteria into another bound field in another form.
My main form is called AddPurchaseOrder. I have a text box in that form called RequisitionNumber. In my form I have a command button that opens another form "DHS1501," both forms will be open.
My query criteria calls on the RequisitionNumber:
[Forms]![AddPurchaseOrder]![RequisitionNumber]
The code on the command to open the DHS1501 form is:
Private Sub Command350_Click()
On Error GoTo Err_Command350_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "DHS1501"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command350_Click:
Exit Sub
Err_Command350_Click:
MsgBox Err.Description
Resume Exit_Command350_Click
End Sub
It never returns a value. What am I missing?
Thank you,
I am having issues passing a text box field's criteria into another bound field in another form.
My main form is called AddPurchaseOrder. I have a text box in that form called RequisitionNumber. In my form I have a command button that opens another form "DHS1501," both forms will be open.
My query criteria calls on the RequisitionNumber:
[Forms]![AddPurchaseOrder]![RequisitionNumber]
The code on the command to open the DHS1501 form is:
Private Sub Command350_Click()
On Error GoTo Err_Command350_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "DHS1501"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command350_Click:
Exit Sub
Err_Command350_Click:
MsgBox Err.Description
Resume Exit_Command350_Click
End Sub
It never returns a value. What am I missing?
Thank you,