AppPath in A97?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • MLH

    #1

    AppPath in A97?

    I was wondering if there was some property whose
    value I could read from a DAO snippet to tell me the
    current AppPath in a runtime setting. If I give someone
    an installation disk, that person could install the runtime
    files into any target target dir. I would like to determine
    that internally somehow. Using the following, could you
    contribute a line or two that would produce the App
    Path?


    Dim dbs As Database
    Set dbs = CurrentDb
    ....
    (I know nothing from this point)
  • RoyVidar

    #2
    Re: AppPath in A97?

    MLH wrote in message <rg42s1pcd32hlg gqco1q25vmhncij a635j@4ax.com> :[color=blue]
    > I was wondering if there was some property whose
    > value I could read from a DAO snippet to tell me the
    > current AppPath in a runtime setting. If I give someone
    > an installation disk, that person could install the runtime
    > files into any target target dir. I would like to determine
    > that internally somehow. Using the following, could you
    > contribute a line or two that would produce the App
    > Path?
    >
    >
    > Dim dbs As Database
    > Set dbs = CurrentDb
    > ...
    > (I know nothing from this point)[/color]

    I don't know anything about installation thingies, but from within
    a db, you can use for instance

    currentdb.name ' or dbs.name (do a msgbox to just display it)

    this will return path and name to the db, so you probably need to strip
    of the name part of it.

    --
    Roy-Vidar


    Comment

    • Lyle Fairfield

      #3
      Re: AppPath in A97?

      MLH <CRCI@NorthStat e.net> wrote in news:rg42s1pcd3 2hlggqco1q25vmh ncija635j@
      4ax.com:
      [color=blue]
      > I was wondering if there was some property whose
      > value I could read from a DAO snippet to tell me the
      > current AppPath in a runtime setting. If I give someone
      > an installation disk, that person could install the runtime
      > files into any target target dir. I would like to determine
      > that internally somehow. Using the following, could you
      > contribute a line or two that would produce the App
      > Path?
      >
      >
      > Dim dbs As Database
      > Set dbs = CurrentDb
      > ...
      > (I know nothing from this point)[/color]

      Public Function PathOfCurrentDB () As String
      ' static notion per Peter Cozens
      Static Path As String
      If Len(Path) = 0 Then
      Path = CurrentDb.Name
      Path = Left$(Path, Len(Path) - Len(Dir$(Path)) )
      End If
      PathOfCurrentDB = Path
      End Function

      --
      Lyle Fairfield

      Comment

      • Terry Kreft

        #4
        Re: AppPath in A97?



        Dim dbName As String
        Dim dbPath As String
        Dim db As DAO.Database

        Set db = CurrentDb
        dbName = db.Name
        dbPath = Left(dbName, InStr(dbName, Dir(dbName)) - 1)



        --
        Terry Kreft



        "MLH" <CRCI@NorthStat e.net> wrote in message
        news:rg42s1pcd3 2hlggqco1q25vmh ncija635j@4ax.c om...[color=blue]
        >I was wondering if there was some property whose
        > value I could read from a DAO snippet to tell me the
        > current AppPath in a runtime setting. If I give someone
        > an installation disk, that person could install the runtime
        > files into any target target dir. I would like to determine
        > that internally somehow. Using the following, could you
        > contribute a line or two that would produce the App
        > Path?
        >
        >
        > Dim dbs As Database
        > Set dbs = CurrentDb
        > ...
        > (I know nothing from this point)[/color]


        Comment

        • Terry Kreft

          #5
          Re: AppPath in A97?

          Whoops, sorry

          dbPath = Left(dbName, InStr(dbName, Dir(dbName)) - 1)

          Should be
          dbPath = Left(dbName, Len(dbName) - Len(Dir(dbName) ))



          --
          Terry Kreft



          "Terry Kreft" <terry.kreft@mp s.co.uk> wrote in message
          news:YYScnWTh5c xu91zeSa8jmw@ka roo.co.uk...[color=blue]
          >
          >
          > Dim dbName As String
          > Dim dbPath As String
          > Dim db As DAO.Database
          >
          > Set db = CurrentDb
          > dbName = db.Name
          > dbPath = Left(dbName, InStr(dbName, Dir(dbName)) - 1)
          >
          >
          >
          > --
          > Terry Kreft
          >
          >
          >
          > "MLH" <CRCI@NorthStat e.net> wrote in message
          > news:rg42s1pcd3 2hlggqco1q25vmh ncija635j@4ax.c om...[color=green]
          >>I was wondering if there was some property whose
          >> value I could read from a DAO snippet to tell me the
          >> current AppPath in a runtime setting. If I give someone
          >> an installation disk, that person could install the runtime
          >> files into any target target dir. I would like to determine
          >> that internally somehow. Using the following, could you
          >> contribute a line or two that would produce the App
          >> Path?
          >>
          >>
          >> Dim dbs As Database
          >> Set dbs = CurrentDb
          >> ...
          >> (I know nothing from this point)[/color]
          >
          >[/color]


          Comment

          • MLH

            #6
            Re: AppPath in A97?

            Thx, guys. All good suggestions.

            Comment

            Working...