Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

seperate Access instances

Status
Not open for further replies.

JeroenNL

Programmer
Nov 28, 2002
217
0
0
NL
Hi there,

I have two Access database. One containing the userinterface (UI) and one containing queries (called a functionality database). The reason I set things up like this is because it's nicely modular; I have several functionality databases each doing a seperate task and one UI database. I run queries from the UI database using a selfwritten function called ExecuteMacro(macroname, dbname) which creates another Access instance pointing to the Access database containing the queries. E.g ExecuteMacro("mymacro","c:\managementdb.mdb"). The macro simply executes all queries in that database. Works perfectly.

The problem: I want to see on screen what the application is doing. So I'm in the UI database executing queries in a functionality database. But how can I let the UI database know what the functionality database is doing (e.g executing query 15 from 20)? Any ideas?

Bye,
Jeroen

A 3d level editor in Delphi
 
Hmmmm...if you're using a DAO.Database or ADODB.Connection and execute queries from the remote database, then you should have some control over what's there. Probably you're iterating through a recordset or collection. If this is the case, you can grab the .Count property of the collection or .RecordCount for the recordset to have the total queries to be run and the current index to say what you suggested.
And the .Name property of the query being run to be displayed in the status bar (DoCmd.RunCommand (acCmdSetStatus, "Running query " & nameofquery & " (" & index & " of " & total"

Or set the caption on a label from the active form to the string built as above...

If not, you need to describe the process in a little more detail.

HTH


[pipe]
Daniel Vlas
Systems Consultant

 
Thanks for the info Danvlas. I'm afraid things are a little more complex though. I'm not interating through recordsets or collections. From inside one Access database i'm simply running a macro (containing a variable number of actions) inside another Access database (by creating another Access instance). So the problem is that the queries run in another database (which thus has the focus) and I have no way to update my userinterface (caption of a label/statusbar/whatever) because the userinterface is in the calling database (which does not have the focus). I hope my problem is clear now, it's pretty hard to explain right.

Bye,
Jeroen

A 3d level editor in Delphi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top