Checking if MDB or MDE on startup

Discussion in 'Microsoft Access Form Coding' started by Richard Krupa, Oct 12, 2003.

  1. 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
     
    Richard Krupa, Oct 12, 2003
    #1
    1. Advertisements

  2. 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]
     
    Marshall Barton, Oct 13, 2003
    #2
    1. Advertisements

  3. 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" <> wrote in message
    news:p...
    > 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]
     
    Richard Krupa, Oct 13, 2003
    #3
  4. Richard Krupa

    TC Guest

    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" <> wrote in message
    news:...
    > 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" <> wrote in message
    > news:u6mib.176615$...
    > > Could you not just take the right 3 characters of;
    > > Application.CurrentDb.Name
    > >
    > >
    > >
    > > "Richard Krupa" <> wrote in message
    > > news:%...
    > > > 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" <> wrote in message
    > > > news:p...
    > > > > 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]
    > > >
    > > >

    > >
    > >

    >
    >
     
    TC, Oct 13, 2003
    #4
  5. Could you not just take the right 3 characters of;
    Application.CurrentDb.Name



    "Richard Krupa" <> wrote in message
    news:%...
    > 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" <> wrote in message
    > news:p...
    > > 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]

    >
    >
     
    Ruskin Hardie, Oct 13, 2003
    #5
  6. 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" <> wrote in message
    news:u6mib.176615$...
    > Could you not just take the right 3 characters of;
    > Application.CurrentDb.Name
    >
    >
    >
    > "Richard Krupa" <> wrote in message
    > news:%...
    > > 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" <> wrote in message
    > > news:p...
    > > > 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]

    > >
    > >

    >
    >
     
    Richard Krupa, Oct 13, 2003
    #6
  7. cheers guys :) much appreciated

    Regards,
    Richard

    "TC" <> 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" <> wrote in message
    > news:...
    > > 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" <> wrote in message
    > > news:u6mib.176615$...
    > > > Could you not just take the right 3 characters of;
    > > > Application.CurrentDb.Name
    > > >
    > > >
    > > >
    > > > "Richard Krupa" <> wrote in message
    > > > news:%...
    > > > > 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" <> wrote in message
    > > > > news:p...
    > > > > > 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]
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Richard Krupa, Oct 13, 2003
    #7
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mdb and mde size and performance

    , Jan 16, 2004, in forum: Microsoft Access Form Coding
    Replies:
    1
    Views:
    336
    John Vinson
    Jan 16, 2004
  2. Albert D. Kallal

    MDE & MDB

    Albert D. Kallal, May 2, 2004, in forum: Microsoft Access Form Coding
    Replies:
    2
    Views:
    159
  3. Jason Gyetko

    DoCmd.PrintOut Works for MDB but not MDE

    Jason Gyetko, Aug 19, 2004, in forum: Microsoft Access Form Coding
    Replies:
    0
    Views:
    195
    Jason Gyetko
    Aug 19, 2004
  4. david epsom dot com dot au

    Error Message different in MDB and MDE

    david epsom dot com dot au, Sep 10, 2004, in forum: Microsoft Access Form Coding
    Replies:
    10
    Views:
    284
    david epsom dot com dot au
    Sep 15, 2004
  5. Carl Rapson

    Start another MDE from one MDE

    Carl Rapson, Mar 25, 2005, in forum: Microsoft Access Form Coding
    Replies:
    2
    Views:
    247
    Carl Rapson
    Mar 28, 2005
Loading...

Share This Page