How to Determine the current project is an ADE???

R

RJ

Is there a way using vba code to determine that a currentproject property is
an ADE? As opposed to a ADP,MDE, MDP or ACCDB? I know there is a way to
determine an MDE from a MDB but when I attempt to use similar code for ADE it
doesn't recognize any property.

Help is neede and appreciated!
 
S

Stefan Hoffmann

hi RJ;
Is there a way using vba code to determine that a currentproject property is
an ADE? As opposed to a ADP,MDE, MDP or ACCDB? I know there is a way to
determine an MDE from a MDB but when I attempt to use similar code for ADE it
doesn't recognize any property.
CurrentProject.Name should be sufficent. You just need to extract the
extension.


mfG
--> stefan <--
 
D

Douglas J. Steele

Actually, since it's common to rename file extensions, that's really not the
best approach.

I know that to determine whether it's an MDB or MDE, you can look for the
MDE property of the database object (CurrentDb.Properties!MDE or
CurrentDb.Properties("MDE")), which will be the letter "T" in an MDE (and
which will not exist in the non-MDE). It's possible that that will work for
an ADE as well.

(Note that looking for a property that doesn't exist will generate an error,
so your code has to be able to handle that error)
 
R

RJ

Hi Doug,

I did try the db property = "T" as I have used it in MDB/MDE files however
it did not work for an ADE. I couldn't find any property for an ADE! I saw
somewhere on the web that it does/should. I didn't realise that it is common
to rename extensions. Is that to help keep those pesky inquisitive users
inthe dark? (aka they wouldn't recognize the extension so they wouldn't kinow
it's an Access file)

BTW I did enjoy your page on beer
 
R

Robert Morley

Out of curiosity, did you try checking for the "MDE" property on the ADE? I
have no reason to know that that would work, but it's the sort of silliness
that sometimes happens. :)


Rob
 
R

RJ

I did. I checked the property of MDB, MDE, ADP, ADE, and ACCDB within and
ADE file. No Property values found.

And yes you are correct about the silliness!
 
T

Tony Toews [MVP]

RJ said:
I did. I checked the property of MDB, MDE, ADP, ADE, and ACCDB within and
ADE file. No Property values found.

There is a properties collection. Can you go through all of them and see if that
property is named something silly?

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
G

Guest

no no no :~)

Not CurrentDb, use CurrentProject for ADB/ADE/

CurrentProject.ProjectType

I've only got A97 installed here, so I can't check. I think
it returns a number instead of a character.

(david)
 
R

RJ

I stepped out of the office for a bit....

That worked like a charm! Thank you everyone for your interest!
 

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