dont want dynaset to be visible

pungentSapling

NeedHotSauce?
Local time
Today, 11:23
Joined
Apr 4, 2002
Messages
115
I have a timecard database and I am running a series of queries that determine if entries have been missed for any individual(s).

The first query determines who should have entries
the second query determines what entries have been made
the third is a mismatch query that determines who has been missed.


DoCmd.OpenQuery "qryMissedEntries1"
DoCmd.OpenQuery "qryMissedEntries2"
DoCmd.OpenQuery "qryMissedEntriesC"

If DCount([Employee Number], "qryMissedEntriesC") > 0 Then
MsgBox "You Missed Some"
End If

The above message box will eventually contain the names of the missed employees.

The problem is that I do not want these queries to show up on the screen.
Is there a way to just run them and not display them?
Or should I just have them close after I generate my message box?
thanks p
 
Open the queries as recordsets.
 
Last edited:
Yes, if dcount() is only for testing whether any records are returned from qryMissedEntriesC, use the recordset's EOF property for the testing.

And if qryMissedEntriesC is based on the other two queries, there is no need to open them.

Thanks Pat
 
Yes, Indeed
Thankyou. Marvelous how that works isn't it.
I am only using C now.

How about making all the records in qryMissedEntriesC show up in a message box.

Right now I have it so the dynaset shows up on the screen, but I would rather have a message box that contains the names of the missed employees.

Should I be using a Dynamic Array?
to declare each variable(employeeName)
or this a job for
For...Next

Or is this job better suited to a form with a list Box?

Thanks again,
p
 

Users who are viewing this thread

Back
Top Bottom