Button to run a group of select/audit queries

Cros0142

New member
Local time
Today, 15:44
Joined
Jul 27, 2011
Messages
1
Hey guys,

hoping to get a little bit of help. I am running a group of audit/select queries and was wondering if there is a way to alter the script or if i can build a macro that would only display queries that resulted with populated fields. It's a large group of queries and 95% of them will just display a blank datasheet view after being run and I was hoping there was a way to only display the queries that have results.

Thank you so much to anytone with the knowledge and time to assist me!

Thanks,
Paul
 
If you're using a form (or forms) to display the results, then you could use the form's Open event to check the record count and use the Cancel argument to prevent the form opening. Something like;
Code:
Private Sub Form_Open(Cancel As Integer)
 
If Me.RecordsetClone.RecordCount = 0 Then Cancel = True
 
End Sub
 

Users who are viewing this thread

Back
Top Bottom