Checking if MDB or MDE on startup 
Author Message
 Checking if MDB or MDE on startup

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



Fri, 31 Mar 2006 06:39:50 GMT  
 Checking if MDB or MDE on startup

Quote:

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



Fri, 31 Mar 2006 07:44:55 GMT  
 Checking if MDB or MDE on startup
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


Quote:

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



Fri, 31 Mar 2006 07:46:56 GMT  
 Checking if MDB or MDE on startup
Could you not just take the right 3 characters of;
Application.CurrentDb.Name


Quote:
> 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




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



Fri, 31 Mar 2006 08:13:12 GMT  
 Checking if MDB or MDE on startup
oh dur! Thanks Ruskin i was looking for a complicated solution and was not
even looking for the obvious simple answer

Regards,
Richard


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



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




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



Fri, 31 Mar 2006 08:31:53 GMT  
 Checking if MDB or MDE on startup
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


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

> Regards,
> Richard



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



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




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



Fri, 31 Mar 2006 07:57:33 GMT  
 Checking if MDB or MDE on startup
cheers guys :) much appreciated

Regards,
Richard

Quote:

> 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



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

> > Regards,
> > Richard



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



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




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



Fri, 31 Mar 2006 16:15:39 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Can I open an MDB from an MDE and when close MDB go back to MDE

2. Check mdb or mde

3. Checking to see if db is MDB or MDE

4. Performance drop in MDE if you use MDB simultaneously to access backend MDB

5. Hiding menu bar on mde startup

6. ACC97: MDE - Save startup settings

7. MDE StartUp() function fails

8. Lost Password on startup MDE file

9. MDE And Startup OPtion!!

10. MDE StartUp() function fails


 
Powered by phpBB® Forum Software © phpBB Group