I am trying to pass two variables, but can't seem to get it to work. Code:
[red]
Private Sub cmdRepStatMtdRptPreview_Click()
cboTeams.SetFocus
DoCmd.OpenReport "rptRepStats_MTDReport", acViewPreview, , _
"[Team] = Forms![frmChooseReport]![cboTeams].Text" And _
"[Month] = Forms![frmChooseReport]![cboChooseMonth].Text"
End Sub
[/red]
Am I missing something? With this code I get 'Type Mismatch' Error...
[red]
Private Sub cmdRepStatMtdRptPreview_Click()
cboTeams.SetFocus
DoCmd.OpenReport "rptRepStats_MTDReport", acViewPreview, , _
"[Team] = Forms![frmChooseReport]![cboTeams].Text" And _
"[Month] = Forms![frmChooseReport]![cboChooseMonth].Text"
End Sub
[/red]
Am I missing something? With this code I get 'Type Mismatch' Error...