PC Review


Reply
Thread Tools Rate Thread

Checking if MDB or MDE on startup

 
 
Richard Krupa
Guest
Posts: n/a
 
      12th Oct 2003
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.

--
Regards,
Richard


 
Reply With Quote
 
 
 
 
Marshall Barton
Guest
Posts: n/a
 
      13th Oct 2003
Richard Krupa wrote:

>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?

--
Marsh
MVP [MS Access]
 
Reply With Quote
 
 
 
 
Richard Krupa
Guest
Posts: n/a
 
      13th Oct 2003
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

"Marshall Barton" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
> Richard Krupa wrote:
>
> >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?
>
> --
> Marsh
> MVP [MS Access]



 
Reply With Quote
 
TC
Guest
Posts: n/a
 
      13th Oct 2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:u6mib.176615$(E-Mail Removed)...
> > Could you not just take the right 3 characters of;
> > Application.CurrentDb.Name
> >
> >
> >
> > "Richard Krupa" <(E-Mail Removed)> wrote in message
> > news:%(E-Mail Removed)...
> > > 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
> > >
> > > "Marshall Barton" <(E-Mail Removed)> wrote in message
> > > news(E-Mail Removed)...
> > > > Richard Krupa wrote:
> > > >
> > > > >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?
> > > >
> > > > --
> > > > Marsh
> > > > MVP [MS Access]
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Ruskin Hardie
Guest
Posts: n/a
 
      13th Oct 2003
Could you not just take the right 3 characters of;
Application.CurrentDb.Name



"Richard Krupa" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
>
> "Marshall Barton" <(E-Mail Removed)> wrote in message
> news(E-Mail Removed)...
> > Richard Krupa wrote:
> >
> > >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?
> >
> > --
> > Marsh
> > MVP [MS Access]

>
>



 
Reply With Quote
 
Richard Krupa
Guest
Posts: n/a
 
      13th Oct 2003
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" <(E-Mail Removed)> wrote in message
news:u6mib.176615$(E-Mail Removed)...
> Could you not just take the right 3 characters of;
> Application.CurrentDb.Name
>
>
>
> "Richard Krupa" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > 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
> >
> > "Marshall Barton" <(E-Mail Removed)> wrote in message
> > news(E-Mail Removed)...
> > > Richard Krupa wrote:
> > >
> > > >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?
> > >
> > > --
> > > Marsh
> > > MVP [MS Access]

> >
> >

>
>



 
Reply With Quote
 
Richard Krupa
Guest
Posts: n/a
 
      13th Oct 2003
cheers guys much appreciated

Regards,
Richard

"TC" <(E-Mail Removed)> wrote in message news:1066011190.582912@teuthos...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message
> > news:u6mib.176615$(E-Mail Removed)...
> > > Could you not just take the right 3 characters of;
> > > Application.CurrentDb.Name
> > >
> > >
> > >
> > > "Richard Krupa" <(E-Mail Removed)> wrote in message
> > > news:%(E-Mail Removed)...
> > > > 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
> > > >
> > > > "Marshall Barton" <(E-Mail Removed)> wrote in message
> > > > news(E-Mail Removed)...
> > > > > Richard Krupa wrote:
> > > > >
> > > > > >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?
> > > > >
> > > > > --
> > > > > Marsh
> > > > > MVP [MS Access]
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Launch mde from another mde: fine tuning slickdock Microsoft Access VBA Modules 1 2nd Mar 2010 03:45 AM
'Normal' MDE or 'Encoded' MDE ?? Javier Gomez Microsoft Access Security 9 27th May 2005 05:19 PM
Start another MDE from one MDE Carl Rapson Microsoft Access Form Coding 2 28th Mar 2005 05:20 PM
Re: Microsoft can't delete .mdb file during .mde creation or .. GVaught Microsoft Access 0 4th Sep 2003 05:30 AM
cannot make MDE file from MDB Lim Heng Sin Microsoft Access 5 8th Jul 2003 10:40 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:07 AM.