Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Jan 2003
    Location
    Central Florida, USA
    Posts
    505
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Sorry for what may seem as silly, but I can't find anything by searching here. Probably using the wrong syntax.

    Is there a way to determine in VBA is the program executing is an mde vs. mdb?

    Thanks in advance for your assistance.

    Ken


  2. #2
    5 Star Lounger AndrewKKWalker's Avatar
    Join Date
    Apr 2001
    Location
    Cambridge, UK
    Posts
    1,020
    Thanks
    0
    Thanked 3 Times in 3 Posts
    CurrentProject.Name

    Will report back the name of the database.

    You can get it from this.
    Assuming you are running this from a Module inside the database.
    And that was your question.
    Andrew

  3. #3
    4 Star Lounger
    Join Date
    Jan 2003
    Location
    Central Florida, USA
    Posts
    505
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Thanks! *Using your suggestion I came up with:




    Dim strPath As String


    strPath = Application.CurrentDb.Name
    If UCase(Right(strPath, 3)) = "MDB" Then
    * * *MsgBox "This is an MDB."
    * * *Else
    * * *If UCase(Right(strPath, 3)) = "MDE" Then*
    * * * * *MsgBox "This is an MDE."
    * * *Else
    * * * * * MsgBox "Unknown Database Format"
    * * *End If
    End If





    And it accomplished my goal.




    Thanks again!




    Ken


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •