Help with hyperlink

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Maria João

    Help with hyperlink

    I have a table with one field that ia a hyperlink to a pdf file that opens
    a specific file.
    Since these files are very big, I would need to change the hyperlink path,
    so that I could send the hyperlink to one CDROM.

    I can do this part, but my problem ist that this DataBase is distributed in
    several machines in several places (not connected) and in each machine the
    CDROM drive have it's own letter (D: or E: ...).

    But I still have another problem: I can find the CDROM drive from some code
    that I copied somewhere, but what happens if the computer doesn't have a
    CDROM drive? It can have only a DVD drive or a CD RW.

    I think the best way to solve my problem should be to ask the user in what
    drive are the pdf files and then I would like all the hyperlinks
    re-directionated to the ney path.

    Can anyone help me with code to perform this?
    I don´t know enought VB for this.

    Thanks in advance

    Maria Joao


  • Joerg Glissmann

    #2
    Re: Help with hyperlink

    Maria João wrote:[color=blue]
    > I have a table with one field that ia a hyperlink to a pdf file that opens
    > a specific file.
    > Since these files are very big, I would need to change the hyperlink path,
    > so that I could send the hyperlink to one CDROM.
    >
    > I can do this part, but my problem ist that this DataBase is distributed in
    > several machines in several places (not connected) and in each machine the
    > CDROM drive have it's own letter (D: or E: ...).
    >
    > But I still have another problem: I can find the CDROM drive from some code
    > that I copied somewhere, but what happens if the computer doesn't have a
    > CDROM drive? It can have only a DVD drive or a CD RW.
    >
    > I think the best way to solve my problem should be to ask the user in what
    > drive are the pdf files and then I would like all the hyperlinks
    > re-directionated to the ney path.
    >
    > Can anyone help me with code to perform this?
    > I don´t know enought VB for this.
    >
    > Thanks in advance
    >
    > Maria Joao
    >[/color]

    Hi Maria,

    how about storing only paths relative to the database in the table
    (e.g. "\folder1\subfo lder1\file1.pdf ")
    then get the databases directory via Application.Cur rentProject.Pat h
    and sticking that in front of the relative path to get the complete path..

    Advantage: as long as the database is in the root folder of your
    application and the data files reside in the correct folder underneath it,
    you can copy the whole shebang to wherever you wish..

    Disadvantage: If you intend to distribute the whole thing via CD, people
    need to copy it to their hard disk first (and maybe remove the write
    protection on the file) to alter any table entries.


    Just my 2ct..

    Joerg

    --
    Joerg Glissmann
    remove pants to reply.. :-)

    Comment

    • Maria João

      #3
      Re: Help with hyperlink

      Hi,

      I think your idea should be the perfect solution, but I still have some
      problems:

      - If the DB is copied to the Hard drive, then the
      Application.Cur rentProject.Pat h doesn't go to the CDRom.
      - I could work only from the CD drive, but the database closes because of an
      error. I f you can help me with this, I could work only from the CD and
      everythig would be OK (except from some delay from working in a CDRom
      drive).

      Please help me whit this

      Thanks in advance

      Maria Joao



      "Joerg Glissmann" <spampants@glis smann.de> wrote in message
      news:B43kc.2$i6 .222@psinet-eu-nl...[color=blue]
      > Maria João wrote:[color=green]
      > > I have a table with one field that ia a hyperlink to a pdf file that[/color][/color]
      opens[color=blue][color=green]
      > > a specific file.
      > > Since these files are very big, I would need to change the hyperlink[/color][/color]
      path,[color=blue][color=green]
      > > so that I could send the hyperlink to one CDROM.
      > >
      > > I can do this part, but my problem ist that this DataBase is distributed[/color][/color]
      in[color=blue][color=green]
      > > several machines in several places (not connected) and in each machine[/color][/color]
      the[color=blue][color=green]
      > > CDROM drive have it's own letter (D: or E: ...).
      > >
      > > But I still have another problem: I can find the CDROM drive from some[/color][/color]
      code[color=blue][color=green]
      > > that I copied somewhere, but what happens if the computer doesn't have a
      > > CDROM drive? It can have only a DVD drive or a CD RW.
      > >
      > > I think the best way to solve my problem should be to ask the user in[/color][/color]
      what[color=blue][color=green]
      > > drive are the pdf files and then I would like all the hyperlinks
      > > re-directionated to the ney path.
      > >
      > > Can anyone help me with code to perform this?
      > > I don´t know enought VB for this.
      > >
      > > Thanks in advance
      > >
      > > Maria Joao
      > >[/color]
      >
      > Hi Maria,
      >
      > how about storing only paths relative to the database in the table
      > (e.g. "\folder1\subfo lder1\file1.pdf ")
      > then get the databases directory via Application.Cur rentProject.Pat h
      > and sticking that in front of the relative path to get the complete path..
      >
      > Advantage: as long as the database is in the root folder of your
      > application and the data files reside in the correct folder underneath it,
      > you can copy the whole shebang to wherever you wish..
      >
      > Disadvantage: If you intend to distribute the whole thing via CD, people
      > need to copy it to their hard disk first (and maybe remove the write
      > protection on the file) to alter any table entries.
      >
      >
      > Just my 2ct..
      >
      > Joerg
      >
      > --
      > Joerg Glissmann
      > remove pants to reply.. :-)
      >[/color]


      Comment

      • Joerg Glissmann

        #4
        Re: Help with hyperlink

        Hey Maria,

        Application.Cur rentProject.Pat h gives you the current path where the Access
        application sits, so it's no wonder it doesn't change to the CDROM drive...
        (My suggestion was to copy the application including the data files to the
        hard disk, but of course that takes a lot of space..)

        I feared that the database has a problem when you run it off a write
        protected medium (i.e. CDROM).

        I found a hint at googling for the problem:


        (also referenced at http://www.kbalertz.com/Feedback_180766.aspx )

        Which gives you a sample code that returns the first CDROM drive letter.
        (Don't worry, you only have to copy & paste the first gray area, the second
        one with the rather few lines show how to use it..)

        Hope that helps,

        Joerg


        Maria João wrote:
        [color=blue]
        > Hi,
        >
        > I think your idea should be the perfect solution, but I still have some
        > problems:
        >
        > - If the DB is copied to the Hard drive, then the
        > Application.Cur rentProject.Pat h doesn't go to the CDRom.
        > - I could work only from the CD drive, but the database closes because of an
        > error. I f you can help me with this, I could work only from the CD and
        > everythig would be OK (except from some delay from working in a CDRom
        > drive).
        >
        > Please help me whit this
        >
        > Thanks in advance
        >
        > Maria Joao
        >
        >
        >
        > "Joerg Glissmann" <spampants@glis smann.de> wrote in message
        > news:B43kc.2$i6 .222@psinet-eu-nl...
        >[color=green]
        >>Maria João wrote:
        >>[color=darkred]
        >>>I have a table with one field that ia a hyperlink to a pdf file that[/color][/color]
        >
        > opens
        >[color=green][color=darkred]
        >>>a specific file.
        >>>Since these files are very big, I would need to change the hyperlink[/color][/color]
        >
        > path,
        >[color=green][color=darkred]
        >>>so that I could send the hyperlink to one CDROM.
        >>>
        >>>I can do this part, but my problem ist that this DataBase is distributed[/color][/color]
        >
        > in
        >[color=green][color=darkred]
        >>>several machines in several places (not connected) and in each machine[/color][/color]
        >
        > the
        >[color=green][color=darkred]
        >>>CDROM drive have it's own letter (D: or E: ...).
        >>>
        >>>But I still have another problem: I can find the CDROM drive from some[/color][/color]
        >
        > code
        >[color=green][color=darkred]
        >>>that I copied somewhere, but what happens if the computer doesn't have a
        >>>CDROM drive? It can have only a DVD drive or a CD RW.
        >>>
        >>>I think the best way to solve my problem should be to ask the user in[/color][/color]
        >
        > what
        >[color=green][color=darkred]
        >>>drive are the pdf files and then I would like all the hyperlinks
        >>>re-directionated to the ney path.
        >>>
        >>>Can anyone help me with code to perform this?
        >>>I don´t know enought VB for this.
        >>>
        >>>Thanks in advance
        >>>
        >>>Maria Joao
        >>>[/color]
        >>
        >>Hi Maria,
        >>
        >>how about storing only paths relative to the database in the table
        >>(e.g. "\folder1\subfo lder1\file1.pdf ")
        >>then get the databases directory via Application.Cur rentProject.Pat h
        >>and sticking that in front of the relative path to get the complete path..
        >>
        >>Advantage: as long as the database is in the root folder of your
        >>application and the data files reside in the correct folder underneath it,
        >>you can copy the whole shebang to wherever you wish..
        >>
        >>Disadvantag e: If you intend to distribute the whole thing via CD, people
        >>need to copy it to their hard disk first (and maybe remove the write
        >>protection on the file) to alter any table entries.
        >>
        >>
        >>Just my 2ct..
        >>
        >>Joerg
        >>
        >>--
        >>Joerg Glissmann
        >>remove pants to reply.. :-)
        >>[/color][/color]


        --
        Joerg Glissmann
        remove pants to reply.. :-)

        Comment

        • Maria João

          #5
          Re: Help with hyperlink

          Ok

          But if the computer doesn't have a CDROM drive? It can have only a DVD drive
          or a CD RW. Does this work properly? I don't have a machine to try this.

          Thanks

          Maria Joao




          "Joerg Glissmann" <spampants@glis smann.de> wrote in message
          news:XK7kc.4$i6 .284@psinet-eu-nl...[color=blue]
          > Hey Maria,
          >
          > Application.Cur rentProject.Pat h gives you the current path where the[/color]
          Access[color=blue]
          > application sits, so it's no wonder it doesn't change to the CDROM[/color]
          drive...[color=blue]
          > (My suggestion was to copy the application including the data files to the
          > hard disk, but of course that takes a lot of space..)
          >
          > I feared that the database has a problem when you run it off a write
          > protected medium (i.e. CDROM).
          >
          > I found a hint at googling for the problem:
          >[/color]
          http://support.microsoft.com:80/supp...180766&SD=MSKB[color=blue]
          >
          > (also referenced at http://www.kbalertz.com/Feedback_180766.aspx )
          >
          > Which gives you a sample code that returns the first CDROM drive letter.
          > (Don't worry, you only have to copy & paste the first gray area, the[/color]
          second[color=blue]
          > one with the rather few lines show how to use it..)
          >
          > Hope that helps,
          >
          > Joerg
          >
          >
          > Maria João wrote:
          >[color=green]
          > > Hi,
          > >
          > > I think your idea should be the perfect solution, but I still have some
          > > problems:
          > >
          > > - If the DB is copied to the Hard drive, then the
          > > Application.Cur rentProject.Pat h doesn't go to the CDRom.
          > > - I could work only from the CD drive, but the database closes because[/color][/color]
          of an[color=blue][color=green]
          > > error. I f you can help me with this, I could work only from the CD and
          > > everythig would be OK (except from some delay from working in a CDRom
          > > drive).
          > >
          > > Please help me whit this
          > >
          > > Thanks in advance
          > >
          > > Maria Joao
          > >
          > >
          > >
          > > "Joerg Glissmann" <spampants@glis smann.de> wrote in message
          > > news:B43kc.2$i6 .222@psinet-eu-nl...
          > >[color=darkred]
          > >>Maria João wrote:
          > >>
          > >>>I have a table with one field that ia a hyperlink to a pdf file that[/color]
          > >
          > > opens
          > >[color=darkred]
          > >>>a specific file.
          > >>>Since these files are very big, I would need to change the hyperlink[/color]
          > >
          > > path,
          > >[color=darkred]
          > >>>so that I could send the hyperlink to one CDROM.
          > >>>
          > >>>I can do this part, but my problem ist that this DataBase is[/color][/color][/color]
          distributed[color=blue][color=green]
          > >
          > > in
          > >[color=darkred]
          > >>>several machines in several places (not connected) and in each machine[/color]
          > >
          > > the
          > >[color=darkred]
          > >>>CDROM drive have it's own letter (D: or E: ...).
          > >>>
          > >>>But I still have another problem: I can find the CDROM drive from some[/color]
          > >
          > > code
          > >[color=darkred]
          > >>>that I copied somewhere, but what happens if the computer doesn't have[/color][/color][/color]
          a[color=blue][color=green][color=darkred]
          > >>>CDROM drive? It can have only a DVD drive or a CD RW.
          > >>>
          > >>>I think the best way to solve my problem should be to ask the user in[/color]
          > >
          > > what
          > >[color=darkred]
          > >>>drive are the pdf files and then I would like all the hyperlinks
          > >>>re-directionated to the ney path.
          > >>>
          > >>>Can anyone help me with code to perform this?
          > >>>I don´t know enought VB for this.
          > >>>
          > >>>Thanks in advance
          > >>>
          > >>>Maria Joao
          > >>>
          > >>
          > >>Hi Maria,
          > >>
          > >>how about storing only paths relative to the database in the table
          > >>(e.g. "\folder1\subfo lder1\file1.pdf ")
          > >>then get the databases directory via Application.Cur rentProject.Pat h
          > >>and sticking that in front of the relative path to get the complete[/color][/color][/color]
          path..[color=blue][color=green][color=darkred]
          > >>
          > >>Advantage: as long as the database is in the root folder of your
          > >>application and the data files reside in the correct folder underneath[/color][/color][/color]
          it,[color=blue][color=green][color=darkred]
          > >>you can copy the whole shebang to wherever you wish..
          > >>
          > >>Disadvantag e: If you intend to distribute the whole thing via CD, people
          > >>need to copy it to their hard disk first (and maybe remove the write
          > >>protection on the file) to alter any table entries.
          > >>
          > >>
          > >>Just my 2ct..
          > >>
          > >>Joerg
          > >>
          > >>--
          > >>Joerg Glissmann
          > >>remove pants to reply.. :-)
          > >>[/color][/color]
          >
          >
          > --
          > Joerg Glissmann
          > remove pants to reply.. :-)
          >[/color]


          Comment

          • Joerg Glissmann

            #6
            Re: Help with hyperlink


            Hmm.. I would have to try that as well.. I'll have to leave that up to you.

            Joerg


            Maria João wrote:[color=blue]
            > Ok
            >
            > But if the computer doesn't have a CDROM drive? It can have only a DVD drive
            > or a CD RW. Does this work properly? I don't have a machine to try this.
            >
            > Thanks
            >
            > Maria Joao
            >
            >
            > "Joerg Glissmann" <spampants@glis smann.de> wrote in message
            > news:XK7kc.4$i6 .284@psinet-eu-nl...
            >[color=green]
            >>Hey Maria,
            >>
            >>Application.C urrentProject.P ath gives you the current path where the[/color]
            >
            > Access
            >[color=green]
            >>application sits, so it's no wonder it doesn't change to the CDROM[/color]
            >
            > drive...
            >[color=green]
            >>(My suggestion was to copy the application including the data files to the
            >>hard disk, but of course that takes a lot of space..)
            >>
            >>I feared that the database has a problem when you run it off a write
            >>protected medium (i.e. CDROM).
            >>
            >>I found a hint at googling for the problem:
            >>[/color]
            >
            > http://support.microsoft.com:80/supp...180766&SD=MSKB
            >[color=green]
            >>(also referenced at http://www.kbalertz.com/Feedback_180766.aspx )
            >>
            >>Which gives you a sample code that returns the first CDROM drive letter.
            >>(Don't worry, you only have to copy & paste the first gray area, the[/color]
            >
            > second
            >[color=green]
            >>one with the rather few lines show how to use it..)
            >>
            >>Hope that helps,
            >>
            >>Joerg
            >>
            >>
            >>Maria João wrote:
            >>
            >>[color=darkred]
            >>>Hi,
            >>>
            >>>I think your idea should be the perfect solution, but I still have some
            >>>problems:
            >>>
            >>>- If the DB is copied to the Hard drive, then the
            >>>Application. CurrentProject. Path doesn't go to the CDRom.
            >>>- I could work only from the CD drive, but the database closes because[/color][/color]
            >
            > of an
            >[color=green][color=darkred]
            >>>error. I f you can help me with this, I could work only from the CD and
            >>>everythig would be OK (except from some delay from working in a CDRom
            >>>drive).
            >>>
            >>>Please help me whit this
            >>>
            >>>Thanks in advance
            >>>
            >>>Maria Joao
            >>>
            >>>
            >>>
            >>>"Joerg Glissmann" <spampants@glis smann.de> wrote in message
            >>>news:B43kc.2 $i6.222@psinet-eu-nl...
            >>>
            >>>
            >>>>Maria João wrote:
            >>>>
            >>>>
            >>>>>I have a table with one field that ia a hyperlink to a pdf file that
            >>>
            >>>opens
            >>>
            >>>
            >>>>>a specific file.
            >>>>>Since these files are very big, I would need to change the hyperlink
            >>>
            >>>path,
            >>>
            >>>
            >>>>>so that I could send the hyperlink to one CDROM.
            >>>>>
            >>>>>I can do this part, but my problem ist that this DataBase is[/color][/color]
            >
            > distributed
            >[color=green][color=darkred]
            >>>in
            >>>
            >>>
            >>>>>several machines in several places (not connected) and in each machine
            >>>
            >>>the
            >>>
            >>>
            >>>>>CDROM drive have it's own letter (D: or E: ...).
            >>>>>
            >>>>>But I still have another problem: I can find the CDROM drive from some
            >>>
            >>>code
            >>>
            >>>
            >>>>>that I copied somewhere, but what happens if the computer doesn't have[/color][/color]
            >
            > a
            >[color=green][color=darkred]
            >>>>>CDROM drive? It can have only a DVD drive or a CD RW.
            >>>>>
            >>>>>I think the best way to solve my problem should be to ask the user in
            >>>
            >>>what
            >>>
            >>>
            >>>>>drive are the pdf files and then I would like all the hyperlinks
            >>>>>re-directionated to the ney path.
            >>>>>
            >>>>>Can anyone help me with code to perform this?
            >>>>>I don´t know enought VB for this.
            >>>>>
            >>>>>Thanks in advance
            >>>>>
            >>>>>Maria Joao
            >>>>>
            >>>>
            >>>>Hi Maria,
            >>>>
            >>>>how about storing only paths relative to the database in the table
            >>>>(e.g. "\folder1\subfo lder1\file1.pdf ")
            >>>>then get the databases directory via Application.Cur rentProject.Pat h
            >>>>and sticking that in front of the relative path to get the complete[/color][/color]
            >
            > path..
            >[color=green][color=darkred]
            >>>>Advantage : as long as the database is in the root folder of your
            >>>>applicati on and the data files reside in the correct folder underneath[/color][/color]
            >
            > it,
            >[color=green][color=darkred]
            >>>>you can copy the whole shebang to wherever you wish..
            >>>>
            >>>>Disadvantag e: If you intend to distribute the whole thing via CD, people
            >>>>need to copy it to their hard disk first (and maybe remove the write
            >>>>protectio n on the file) to alter any table entries.
            >>>>
            >>>>
            >>>>Just my 2ct..
            >>>>
            >>>>Joerg
            >>>>
            >>>>--
            >>>>Joerg Glissmann
            >>>>remove pants to reply.. :-)
            >>>>[/color]
            >>
            >>
            >>--
            >>Joerg Glissmann
            >>remove pants to reply.. :-)
            >>[/color]
            >
            >
            >[/color]


            --
            Joerg Glissmann
            remove pants to reply.. :-)

            Comment

            Working...