Last Day Of Job Need Urgent Answer

CJBIRKIN

Drink!
Local time
Today, 11:20
Joined
May 10, 2002
Messages
255
Hello

I'm leaving my job this afternoon for pastures new and i really need to know this before i go.

Is it possible to create an object of a database in the current database and then get it to run any of the following;

1) a macro
2) code in a module
3) a query

I have 2 databases, the first creates a hospital waitinglist. The second finds any missing data and then repairs it --with or without human intervention-- then the first database updates the data and completes the list.

The idea is that all the queries (over 100) that create the waiting list remain in 1 database and the error finding stuff stays in another. The errors must be completed before the final compiling of the list is done. I want to control all the processes for this from the second database which means running queries in the 1st without it being opened.

I have tried

Dim ws As DAO.Workspace
Dim db As DAO.Database
' Create Microsoft Jet Workspace object.
Set ws = CreateWorkspace("", "admin", "", dbUseJet)
' Open Database object from saved Microsoft Jet database for exclusive use.

Set db = ws.OpenDatabase("V:\Billing\COMBINE_MONTHLY-WAITING-LIST-MANAGERS.mdb", , False)


With db

and then i get stuck i don't know how to reference any of the queries or macros in this database. i have tried the docmd but it only works in the current db and db.docmd doesn't appear as an option


Any help would be greatly appreciated

Chris
 

Users who are viewing this thread

Back
Top Bottom