Running database automatically

krulle

New member
Local time
Today, 22:09
Joined
Aug 12, 2009
Messages
2
Dear


I have a question concerning VBA in MS Access to make a database automated.

The situation: I inherrited a toolkit from a previous collegue, and so far I could do every requested modification with tables and queries.

The toolkit works as follows: when the database is opened, there is a form opening. In this form you can select a project from the list variables (by scrolling), and you can do several calculations by pressing a button that runs a macro.

Due to a centralisation, this tool will be used in other divisions, and there is a need to run several analyses on different projects in a batch (e.g 10 project calculations over night).

Therefore I would like to make a list that represents the batch (e.g. Project A, project D, project F...), but I need some kind of method to do the following:

- select project A in the start-up form
- run macro
- select project D in the start-up form
- run macro
- select project F in the start-up form
- run macro
- ...

The reason that I have to work via the start-up form is that many queries go back to use values from the start-up from. I know it is not ideal, but I did not create the database.

What would the best to use for this?

I have so far no knowledge at all about VBA. My software-knowledge is restricted to basic JAVA (school course 7 years ago) and some mathematical programming (maple and matlab)

Does any-one has some VBA code in mind to get this done?


Thanks in advance

Kristof
 
Sure you can...
You have to open the list of projects in code... Presuming you type those projects into a table.... Check out the "OpenRecordset" in the access help for that...
Simply add anything you need to setup in seperate columns and write the values onto the form

Then simply "write" into the form...
Me.ControlName = "SomeValue"

Will allow you to manipulate the form from code and docmd.RunMacro will allow you to run a macro from code...

I would stick an "Run Auto" button on the form with above (to be made) coding in it to do what you want it to... Should not be to hard...

Are these calculations so long that it needs overnight processing?? WOW

P.S. Welcome to AWF
 
Sure you can...
You have to open the list of projects in code... Presuming you type those projects into a table.... Check out the "OpenRecordset" in the access help for that...
Simply add anything you need to setup in seperate columns and write the values onto the form

Then simply "write" into the form...
Me.ControlName = "SomeValue"

Will allow you to manipulate the form from code and docmd.RunMacro will allow you to run a macro from code...

I would stick an "Run Auto" button on the form with above (to be made) coding in it to do what you want it to... Should not be to hard...

Are these calculations so long that it needs overnight processing?? WOW

P.S. Welcome to AWF


Hi


Thanks for the feedback. How can you make that the code is selecting a new project (= making sure that "SomeValue" is changed every time after a run was done)

VBA is still some black magic for me ...


The analysis takes up to 20 minutes in some divisions (because they need a lot of data from a central DataWareHouse in Brussels)
 
Start by doing what I told you... Check out the OpenRecordset in the Access help (or on the forum) . This will allow you to put information into a table and read that info in code... each time passing that info to the form using me...
 

Users who are viewing this thread

Back
Top Bottom