Re: New to VBA Please help
When you open your report from the preview button on your form, you need
to specify any filter conditions or parameters.
Re: New to VBA Please help
Please give me an example of that
Re: New to VBA Please help
VB Code:
Private Sub cmdOpenReport_Click()
On Error GoTo Err_Command6_Click
'Run a menu command to filter the form
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 0, , acMenuVer70
'Or Open a report with a where condition to limit the records.
DoCmd.OpenReport "MyReport", acViewPreview, , "ReportID = 888"
Exit_Command6_Click:
Exit Sub
Err_Command6_Click:
MsgBox Err.Description
Resume Exit_Command6_Click
End Sub
Re: New to VBA Please help
Re: New to VBA Please help
No prob.
The where condition in the OpenReport method is like a SQL where clause
without the word "Where". ;)