G
Guest
I have a command button on a form to print a report. I want to pass a two items from the form to the report query but I can't seem to get the code right. This is what I have
Private Sub cmdPrM1_Click(
On Error GoTo Err_cmdPrM1_Clic
Dim stDocName As Strin
stDocName = "VendMatl
DoCmd.OpenReport stDocName, acPreview, [ven_qte]![FGREF] = """ & Me.FGREF & """ And [ven_qte]![Name] = """ & Me.cbomsup1 & ""
Exit_cmdPrM1_Click
Exit Su
Err_cmdPrM1_Click
MsgBox Err.Descriptio
Resume Exit_cmdPrM1_Clic
End Su
What am I missing? Thanks in advance.
Private Sub cmdPrM1_Click(
On Error GoTo Err_cmdPrM1_Clic
Dim stDocName As Strin
stDocName = "VendMatl
DoCmd.OpenReport stDocName, acPreview, [ven_qte]![FGREF] = """ & Me.FGREF & """ And [ven_qte]![Name] = """ & Me.cbomsup1 & ""
Exit_cmdPrM1_Click
Exit Su
Err_cmdPrM1_Click
MsgBox Err.Descriptio
Resume Exit_cmdPrM1_Clic
End Su
What am I missing? Thanks in advance.