Use code to make a mde as reference

H

Harry H

Hi all, I have a mdb and a mde file. I need to use vba on the MDB to code
the mde as a reference to the mdb. Is this possible and example. Thanks in
advance.
 
A

Arno R

Harry H said:
Hi all, I have a mdb and a mde file. I need to use vba on the MDB to code
the mde as a reference to the mdb. Is this possible and example. Thanks in
advance.

Application.References.AddFromFile "C:\YourDirPath\YourRef.mde"

Arno R
 
R

Rick Brandt

TC said:
You realize that an MDB can not reference an MDE?

Huh? How could one make an MDE that references another MDE if one doesn't start
out with an MDB that references an MDE?
 
T

TC

Ooo, perhaps I misread that & it says that you can not save an /mde/
which references an /mdb/ ?

TC
 
R

Rick Brandt

TC said:
Ooo, perhaps I misread that & it says that you can not save an /mde/
which references an /mdb/ ?

TC

Okay, that one I believe I have heard as well. I was pretty sure that I had
MDBs in the past that used Stephen Lebans' report-to-RTF MDE as references
without a problem.
 
A

Arno R

TC said:
Ooo, perhaps I misread that & it says that you can not save an /mde/
which references an /mdb/ ?

TC

If you have an mdb (as the OP has) and want to set a reference to an mde (as the OP says he wants) than you can try:
Application.References.AddFromFile "C:\YourDirPath\YourRef.mde" as I have said in my post.
e.g. I have a codelib (saved as mde) that I reference this way in a production mdb (just to protect some code I am using).

Or am I misreading the question here??

Arno R
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top