Merging Procedures

  • Thread starter Thread starter Tony Williams
  • Start date Start date
T

Tony Williams

I have a form that has three command buttons. On the OnClick of each button
there is a procedure that runs that checks the input, pops up messages if
are errors and then each procedure runs a query that is dependent on the
previous procedure and query having run before it. I want to merge the three
procedures so that the three separate actions appear seamless to the user by
clicking on only one button. Can I be sure that if I merge the procedures
into one that they will run in the correct order.
Thanks
Tony
 
Tony,

They will run in the order that they are written in your code. As long
as the logic of your code is as required, you should get the results you
need.
 
Tony Williams said:
I have a form that has three command buttons. On the OnClick of each button
there is a procedure that runs that checks the input, pops up messages if
are errors and then each procedure runs a query that is dependent on the
previous procedure and query having run before it. I want to merge the
three procedures so that the three separate actions appear seamless to the
user by clicking on only one button. Can I be sure that if I merge the
procedures into one that they will run in the correct order.
Thanks
Tony
You have a couple of options. Either call the event procedures of the 2nd
and 3rd buttons from the click event of the 1st or put all of the code in a
public sub and call it from your 1st button. It will run in the order you
write it barring any run-time errors occurring.

HTH - Keith.
www.keithwilby.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top