[dba-VB] threading

jwcolby jwcolby at colbyconsulting.com
Wed Dec 9 13:14:16 CST 2009

As mentioned in previous emails, I am developing an application to manage all of the tasks for the 
DBFH.  This includes Backing up databases, creating orders, transferring data between an external 
app etc.  I am trying to determine how to thread this app such that if I start a process exporting 
data to Accuzip, I could have another process importing data from Accuzip, and also be working on an 

As things currently stand, each of these tasks is a project and each project has its own forms and 
classes, and anything else necessary for that task.  I really do want to be able to do multiple 
things like this at the same time.  Exporting data to Accuzip can take overnight, and actually 
consists of an export and a matching import process.  It makes perfect sense (to me) to have threads 
doing this kind of thing, and allow me to go back to the main application and do something else.

But at what level would I use a thread?  Would I use a thread to open the form that performs the AZ 
process?  This would allow me to get that started and immediately go back to the main app and open 
another form (using a new thread?) to start processing an order.

Or would the form open and the button on the form start a thread that executes the process?  If a 
form starts a thread, that allows the user (me) to do other things in that form potentially changing 
to a new directory or selecting a different database.  Do you disable all controls on a form when a 
thread starts?  I never had to think about this in VBA and it is all rather confusing.

John W. Colby

More information about the dba-VB mailing list