How do I Hide the results of my Access Query?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have several queries in Access that I have to run to populate a some tables
and I don't want the users to see the result of each query that is run. I
would like the user to click a button to run the queries and just get the
final results not the results to the previous 4 queries.
 
What "results" are they seeing? Are they seeing the warning dialogs? If so,
use
DoCmd.SetWarnings False
and
DoCmd.SetWarnings True
 
JrMonteCarlo24 said:
They are seeing the results in the Datasheet view.

Actions queries are executed. There is no reason to "open" them in datasheet
view to get them to work.

What does your button code look like?
 
DoCmd.SetWarnings False

stDocName = "JantoDec"
DoCmd.OpenQuery stDocName, acViewNormal, acReadOnly

stDocName2 = "CurrentPeriod"
DoCmd.OpenQuery stDocName2, acViewNormal, acReadOnly

stDocName3 = "OneThruPriorPeriod"
DoCmd.OpenQuery stDocName3, acViewNormal, acReadOnly

stDocName4 = "ContractChanges"
DoCmd.OpenQuery stDocName4, acViewNormal, acReadOnly
 
Are these queries Action or Select queries? Maybe you could provide the SQL
view of one or more of these.
 
Try:

DoCmd.SetWarnings False
DoCmd.OpenQuery "JantoDec"
DoCmd.OpenQuery "CurrentPeriod"
DoCmd.OpenQuery "OneThruPriorPeriod"
DoCmd.OpenQuery "ContractChanges"
DoCmd.SetWarnings True

Queries SHOULD run in the background without opening...
 
Back
Top