command button to run 2 querys

  • Thread starter Thread starter zaps via AccessMonster.com
  • Start date Start date
Z

zaps via AccessMonster.com

Hi there,
Is it possible to have a command button run more than 1 query? I have 2
querys "qry_CommentType" and "qry_CommentTypeTotal". The "qry_CommentType"
needs to be run before the other one. Right now I have 2 command buttons on
my form to run each query separately. Any great is greatly appreciated!
 
Yes, you can have one button do them all, and they'll run synchronously,
which means query 2 will wait for query 1 to finish. it's done all the time.

Sam
 
Do you know how I can do this? Also, could I have the button run the 2
querys in sequence, and then open up a report?
 
DoCmd.OpenQuery "the first query name in quotes",...etc.
DoCmd.OpenQuery "the second query name in quotes",...etc.
DoCmd.OpenReport "your report name in quotes",...etc.

You can see the methods in the help file for details.

Sam
Do you know how I can do this? Also, could I have the button run the 2
querys in sequence, and then open up a report?
Yes, you can have one button do them all, and they'll run synchronously,
which means query 2 will wait for query 1 to finish. it's done all the time.
[quoted text clipped - 6 lines]
 
Back
Top