By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,454 Members | 2,629 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,454 IT Pros & Developers. It's quick & easy.

Push button method

P: n/a
I have a form with 5 buttons, each of them executing code and showing a
different report. I would like to add a 6th button 'total' that opens all 5
reports in a row (next report opens when other is closed).

Should I move the code from the 5 buttons into functions so that I can call
them from each button and that I can run the code consecutively in the
'total' button? Or is there some (quick 'n dirty) way to push the 5 buttons
from the 'total' button using VB? I can't find such a method in the Help
files.

Thanks,
john
Jul 22 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Sun, 22 Jul 2007 21:46:53 +0200, "John" <xx*@yyy.comwrote:

You can call the five click events in the click event of your sixth
button:
mybutton1_Click
mybutton2_Click
'etc.

-Tom.

>I have a form with 5 buttons, each of them executing code and showing a
different report. I would like to add a 6th button 'total' that opens all 5
reports in a row (next report opens when other is closed).

Should I move the code from the 5 buttons into functions so that I can call
them from each button and that I can run the code consecutively in the
'total' button? Or is there some (quick 'n dirty) way to push the 5 buttons
from the 'total' button using VB? I can't find such a method in the Help
files.

Thanks,
john
Jul 22 '07 #2

P: n/a
Youv can call event procedures from code, so your 6th button could run code
like:

Command1_Click
Command2_Click
Command3_Click
Command4_Click
Command5_Click

"John" <xx*@yyy.comwrote in message
news:f8***********@textnews.wanadoo.nl...
>I have a form with 5 buttons, each of them executing code and showing a
different report. I would like to add a 6th button 'total' that opens all 5
reports in a row (next report opens when other is closed).

Should I move the code from the 5 buttons into functions so that I can
call them from each button and that I can run the code consecutively in
the 'total' button? Or is there some (quick 'n dirty) way to push the 5
buttons from the 'total' button using VB? I can't find such a method in
the Help files.

Thanks,
john

Jul 22 '07 #3

P: n/a
Thanks guys!
john

"John" <xx*@yyy.comschreef in bericht
news:f8***********@textnews.wanadoo.nl...
>I have a form with 5 buttons, each of them executing code and showing a
different report. I would like to add a 6th button 'total' that opens all 5
reports in a row (next report opens when other is closed).

Should I move the code from the 5 buttons into functions so that I can
call them from each button and that I can run the code consecutively in
the 'total' button? Or is there some (quick 'n dirty) way to push the 5
buttons from the 'total' button using VB? I can't find such a method in
the Help files.

Thanks,
john

Jul 22 '07 #4

P: n/a
Sometimes when running a series of reports there will be a problem because
your printing queue will becoem overwhelmed as it were. Although I've never
had occassion to try this, it's been suggested by some quite good people that
placing

DoEvents

between the call to each report will allow Windows to complete the process
for one report before starting the next.

Good Luck!

Linq

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200707/1

Jul 22 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.