SommerAlain
asked on
Connection between 2 databases
I have 3 Access databases using similar modules.
For easing the maintenance of the modules, I would like to locate the modules in one database and to use those modules in the 2 other databases.
Is it feasible?
For easing the maintenance of the modules, I would like to locate the modules in one database and to use those modules in the 2 other databases.
Is it feasible?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Jim, Thank you it looks clear. I will see it later today. I mainly use sql code. Is there somthing specific?
Have a nice day
Have a nice day
<aside>
Also what some Access developers do is simply store all their "useful" codes in one simple text file
The code in your MDA file should only contain the code needed for that particular system
JeffCoachman
Also what some Access developers do is simply store all their "useful" codes in one simple text file
The code in your MDA file should only contain the code needed for that particular system
JeffCoachman
ASKER
Thanks,
In DataBase A I have a sub like this one:
Private Sub CalculateXXS
Call CalculateComplex("TableLoc alTable")
End Sub
Imagine that the code of the sub CalculateComplex is in DataBase B and that the TableLocalTable is in DataBase A.
How to adapt this code to make it work?
Best regards
In DataBase A I have a sub like this one:
Private Sub CalculateXXS
Call CalculateComplex("TableLoc
End Sub
Imagine that the code of the sub CalculateComplex is in DataBase B and that the TableLocalTable is in DataBase A.
How to adapt this code to make it work?
Best regards
In this case, there is nothing you would need to do. When you need to use CodeDB() is if your code is referring to objects in the library DB.
CurrentDB() always points to the DB open in the Access interface. CodeDB() may or may not be different depending on the procedure that is currently executing and where it is.
This is actually how all the Access Wizards are written that you use, and things like the F2 Zoom Box.
Jim.
CurrentDB() always points to the DB open in the Access interface. CodeDB() may or may not be different depending on the procedure that is currently executing and where it is.
This is actually how all the Access Wizards are written that you use, and things like the F2 Zoom Box.
Jim.
Depending on the operations you are performing, it may be important to know where the code is executing.
See the on-line help for CodeDB() for all the details.
Jim.