E
Eric
I have a command button on a Form that runs a query. It
appears on every record in the Form. I want the "part
number" field in the query to be filtered based on the
information in the "part number" field of the form record
that is active (on screen) when the user presses the
button.
This is the VBA that I have so far (what I need to know
is, what do I use in place of the ??????):
Private Sub RunQuery_Click()
On Error GoTo Err_RunQuery_Click
Dim stDocName As String
stDocName = "Received"
DoCmd.OpenQuery stDocName, acNormal, acEdit
DoCmd.ApplyFilter , "[PDC Part Number] = ??????"
Exit_RunQuery_Click:
Exit Sub
Err_RunQuery_Click:
MsgBox Err.Description
Resume Exit_RunQuery_Click
End Sub
appears on every record in the Form. I want the "part
number" field in the query to be filtered based on the
information in the "part number" field of the form record
that is active (on screen) when the user presses the
button.
This is the VBA that I have so far (what I need to know
is, what do I use in place of the ??????):
Private Sub RunQuery_Click()
On Error GoTo Err_RunQuery_Click
Dim stDocName As String
stDocName = "Received"
DoCmd.OpenQuery stDocName, acNormal, acEdit
DoCmd.ApplyFilter , "[PDC Part Number] = ??????"
Exit_RunQuery_Click:
Exit Sub
Err_RunQuery_Click:
MsgBox Err.Description
Resume Exit_RunQuery_Click
End Sub