I have 3 modules that I trigger individually with a command button to run the code. What I'm curious is there a way for me to run the 3 different modules one right after the other?
Currently there is 2 buttons that open up the same form but with different filtering and a third button that opens another form.
If needed I could add the code behind each button, but I'm hoping its not. It is lengthy.
In the code for the button, call the 3 other functions. -
Sub ButtonName_Click()
-
Call FunctionNameA()
-
Call FunctionNameB()
-
Call FunctionNameC()
-
End Sub
-
The bigger issue you should be working on is why the code takes 3 days and 12 hours to run. Most likely something is running extremely inefficiently and if you fix the inefficiency, you can cut the run time down to minutes.
6 2255
DJ,
Your question is a bit confusing, as you talk about triggering modules. I think I understand what you mean there, but then you mention opening different forms.
One does not trigger modules, one triggers procedures within modules. As long as those procedures are public, they can be executed from anywhere at any time, in or out of sequence. Perhaps we need a bit of clarification on this one.
However, I think the general answer to your question is “yes”.
Hope this hepps.
That's good, When I'm back in front of the database I will post the code of each module. What I truly want to do is click a button and have it trigger function 1, and once this one is complete it will trigger function 2 and so one. Each one of these function exports several reports of a certain report that meet certain criteria.
I kind of goofed in my question. I have macros(I know the wrong way of doing) that open a filtered form. Then on that form I have a button that triggers the function to export reports that meet certain criteria. As it stands now everything works perfectly, I just have to do it individually and one of the function runs for 3 days straight, the other 2 can be done in less than 12 hrs.
In the code for the button, call the 3 other functions. -
Sub ButtonName_Click()
-
Call FunctionNameA()
-
Call FunctionNameB()
-
Call FunctionNameC()
-
End Sub
-
The bigger issue you should be working on is why the code takes 3 days and 12 hours to run. Most likely something is running extremely inefficiently and if you fix the inefficiency, you can cut the run time down to minutes.
Wow a lot easier than I thought. This is a very complex database created by another programmer and its been taking me a long time to chip away at it, but getting there. Some of the time is, there are thousands of reports to export out. I usually have it run on the weekends while i'm off of work.
NeoPa 32,556
Expert Mod 16PB
I'm just going to go ahead and mark Rabbit's post as the Best Answer. It perfectly answers the question posed.
Feel free to create a new thread for this but figuring out the purpose of exporting thousands of reports and addressing that need in a different way help the run time tremendously. I suspect no one's actually looking at these thousands of exports and it's being used for a different purpose. Eliminating this export by serving the ultimate end goal in another way will be a huge time saver.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Daniel Pryde |
last post by:
Hi there.
I'm currently trying to learn Python, my aim being to create my final
year project at university using only Python instead of Java. I've run
into a problem though while trying to make...
|
by: Steven An |
last post by:
Howdy,
I need to write an update query with multiple aggregate functions.
Here is an example:
UPDATE t
SET
t.a = ( select avg(f.q) from dbo.foo f where f.p = t.y ),
t.b = ( select sum(f.q)...
|
by: Andrew Poulos |
last post by:
I having some trouble understanding how to make functions private
I have created an instance of an object using a constructor function and
there are 4 prototypes:
Comm = function() {
//blah...
|
by: Duane |
last post by:
Can anyone tell me what is the standard practice for
creating functions that can be used globally by a asp.net
application. Should we put them in a class or just
create another webform and...
|
by: Mat |
last post by:
Hi,
I am trying to create a set of global functions that are available to
any page. However I am not really getting anywhere, even after looking
at several examples.
This is the code I have...
|
by: Mark P |
last post by:
#include <iostream>
using namespace std;
struct Base
{
virtual int foo () {return 1;}
virtual int foo (int i) {return 2;}
virtual ~Base () {}
};
|
by: John |
last post by:
Hi
Is there a way to declare public functions that can be accessed in any aspx
page? Can global variables be declared?
Thanks
Regards
|
by: Calm_Pear |
last post by:
Hi all,
I have created an object with a default function; the default function
exposes a public function as well.
myobject = function(){
|
by: akaash19 |
last post by:
I want to have one private key at server but multiple public keys for multiple clients. Can we generate multiple public keys for one private key?
|
by: molly00mayhem |
last post by:
hi all
um, lets see, im a 4th year elementary school teacher in a large urban area, msaccess novice, new to this forum, who has been helped greatly by the pros here. i took a break from reading...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |