Hey guys,
What's the easiest way to check if at least one record exists before opening a report (from a form). The report is based on a query which is in turn based on certain values from the form.
So what I want is
Thanks for the help,
Collen
What's the easiest way to check if at least one record exists before opening a report (from a form). The report is based on a query which is in turn based on certain values from the form.
So what I want is
Code:
If Recordsexist then [green]'What would this line be???[/green]
DoCmd.OpenReport "MyReport", acViewPreview
DoCmd.Close acForm, "MyForm"
Else
Msgbox ("No Records exist for this report.")
End If
Thanks for the help,
Collen