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?