D
dcornett63
Hello,
After a user inputs the data on a userform, they must print out a report
with that data for manager approval. To make it easier for the user, I have
placed a button on the form that will launch the report. However, the form
needs to be filtered by two other fields: [tbl CU Code]![CU #] and [tbl Bid
Award]![Req #]. Can you please show me how to include the filter criteria in
my code?
My button code is below
_____________________________________________________________
Private Sub Enc_Btn_Click()
On Error GoTo Err_Enc_Btn_Click
Dim stDocName As String
stDocName = "Encumbrance Notice"
If Me.Dirty Then Me.Dirty = False
DoCmd.OpenReport stDocName, acPreview
Exit_Enc_Btn_Click:
Exit Sub
Err_Enc_Btn_Click:
MsgBox Err.Description
Resume Exit_Enc_Btn_Click
End Sub
______________________________________________________
After a user inputs the data on a userform, they must print out a report
with that data for manager approval. To make it easier for the user, I have
placed a button on the form that will launch the report. However, the form
needs to be filtered by two other fields: [tbl CU Code]![CU #] and [tbl Bid
Award]![Req #]. Can you please show me how to include the filter criteria in
my code?
My button code is below
_____________________________________________________________
Private Sub Enc_Btn_Click()
On Error GoTo Err_Enc_Btn_Click
Dim stDocName As String
stDocName = "Encumbrance Notice"
If Me.Dirty Then Me.Dirty = False
DoCmd.OpenReport stDocName, acPreview
Exit_Enc_Btn_Click:
Exit Sub
Err_Enc_Btn_Click:
MsgBox Err.Description
Resume Exit_Enc_Btn_Click
End Sub
______________________________________________________