Reputation: 6645
I have a query that checks for any records that meet a specific set of criteria. I want some VBA or a macro that runs the query on DB startup and then displays a form if the query returns any results. If not nothing should happen.
Upvotes: 1
Views: 253
Reputation: 6645
Answer with help from HansUp (above), put the following in the Autoexec:
If DCount("*", "Query_name") > 0 Then
DoCmd.OpenForm "Form_name", , , , , acDialog
End If
Upvotes: 2