Calling a DMax functions in different databases (1 Viewer)

BillP

Registered User.
Local time
Today, 09:44
Joined
Nov 22, 1999
Messages
13
I am calling a procedure in Database B from a module in Database A. The procedure in Database B uses a DMax function. The procedure runs properly when the procedure is called in Database B, but fails when it is called from Database A. It seems the DMax function is looking for the table in the wrong database. Does anyone know how to get around this?
 
A

anilrb

Guest
The best way to do this is write some VB code that uses SQL to query the other database.

The Dmax function is only valid within the current database. Since you are using another database, you'll have to use the recordset.
 

BillP

Registered User.
Local time
Today, 09:44
Joined
Nov 22, 1999
Messages
13
Thanks for the info. I actually did as you suggested the day I posted the question (I had a deadline) and it worked well. It's too bad the DMax can't work across databases because it means I've got more work to do. I'm in the process of segmenting an existing database, and there are a few DMax functions scattered throughout the code.
 

Users who are viewing this thread

Top Bottom