Access Runtime CreateObject; GetObject

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

This is my problem: I appreciate any help.

I have an .mdb database (db1) which only has forms, code and reports.

I connect tables existing in another database (db2) to db1 during runtime.
The reason is that I should be able to connect several databases containing
tables, one at a time.

Here is where I am unsure:

I believe that I must have two instances of Access so I use

Set appAccess = GetObject(FileName)

And I connect tables in db2 to db1.

It all works well on my primary computer.

When I transfer the application to another computer with Access Runtime
installed, it stops.

Please help.
Kamil
 
When using the runtime, you can only open Access if you specify
an MDB/MDE (as you have shown). You can't open an empty Access
object without an MDB/MDE.

When you open an Access MDB/MDE on a new computer, it may not
load correctly if the code references objects (Office,VBA,Word
etc) which are installed differently on the new computer.

If you are using workgroup security on your MDB/MDE, opening
an Access object against the file may be very difficult.

When you want to link to tables in a different database, it
is better and easier to use a DAO object, rather than an
Access object. What exactly are you trying to do?

(david)
 
Thank you David, this is also what I found out.

Instead of fiddling with a new instance of Access, I used the command
OpenDatabase which was really what I needed. It worked well.

Thanks again
Kamil
 
Back
Top