Checking if MDB or MDE on startup

R

Richard Krupa

Hey guys,

Does anyone know of a way i can check that the access file in use is an mde
or mdb? i have some code that i wanted executed for example disbale the
shift bypass only on the mde. (obviously dont want to lock myself out of the
mdb!) At present i'm using a hidden flag to set if i want to disable some of
these options.
 
M

Marshall Barton

Richard said:
Does anyone know of a way i can check that the access file in use is an mde
or mdb? i have some code that i wanted executed for example disbale the
shift bypass only on the mde. (obviously dont want to lock myself out of the
mdb!) At present i'm using a hidden flag to set if i want to disable some of
these options.

Does SysCmd(acSysCmdRuntime) do what you want?
 
R

Richard Krupa

no, that just tells me if its the runtime version of access running. alot of
the sites have the full version of access installed because they use access
for other things. I need to test if its the mde (which is what we give to
clients) or the mdb (which is what we use to develop) running

Regards,
Richard
 
T

TC

But that won't work if someone renames their MDE to MDB!

The correct andser is:

If currentdb.properties![MDE] = "T" then
' it is an MDE file.
endif

You may need to include an error trap for the case where that property does
not exist (ie. in an MDB).

HTH,
TC
 
R

Ruskin Hardie

Could you not just take the right 3 characters of;
Application.CurrentDb.Name



Richard Krupa said:
no, that just tells me if its the runtime version of access running. alot of
the sites have the full version of access installed because they use access
for other things. I need to test if its the mde (which is what we give to
clients) or the mdb (which is what we use to develop) running

Regards,
Richard

of
some
 
R

Richard Krupa

oh dur! Thanks Ruskin i was looking for a complicated solution and was not
even looking for the obvious simple answer

Regards,
Richard

Ruskin Hardie said:
Could you not just take the right 3 characters of;
Application.CurrentDb.Name



Richard Krupa said:
no, that just tells me if its the runtime version of access running.
alot
 
R

Richard Krupa

cheers guys :) much appreciated

Regards,
Richard

TC said:
But that won't work if someone renames their MDE to MDB!

The correct andser is:

If currentdb.properties![MDE] = "T" then
' it is an MDE file.
endif

You may need to include an error trap for the case where that property does
not exist (ie. in an MDB).

HTH,
TC


Richard Krupa said:
oh dur! Thanks Ruskin i was looking for a complicated solution and was not
even looking for the obvious simple answer

Regards,
Richard

give
to is disbale
the
 

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