Results 1 to 4 of 4
  1. #1
    kaylachris is offline Novice
    Windows Vista Access 2007
    Join Date
    May 2010
    Posts
    21

    Question User created Hyperlink

    I was wondering if it is possiable to place a command button/text box or other object on a form that would allow a user to find a file on the computer and create a hyperlink to that particular file that would then be stored in a table field.
    Here are the steps I wish to happen on my form:



    1. User clicks a button (named "Update")to browse for a file on their computer(much like when you up load a document to the internet)

    2. Once the user finds the document a hyperlink will be stored in my table (field name "POI") to that document and appear on the same form that the user clicked to browse for the file. (I don't want to attach the files to the table.. just a link to open them)

    3. Lastly, when the user presses "update" agian steps one and two will happen once more replacing the old hyperlink with the new.

    I've attached a picture of what I really want the end result to be to.
    Hopefully, I've made this clear enough for someone to understand my intent. I really want to know if this is even possiable in ACCESS07 if you could provide me a bit knowledge where to find the code for such a task it be greatly appreciated as well.

    Thanks in advance.

  2. #2
    Datagopherdan is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Dec 2008
    Posts
    220
    If you're running Access 2007, theres an "Attachment" type field available in the tables, which will allow the users to navigate and store file paths.

  3. #3
    kaylachris is offline Novice
    Windows Vista Access 2007
    Join Date
    May 2010
    Posts
    21
    I know of the attachment field in '07 but I was looking for a solution a bit more sophisticated. I want only 1 file to be displayed at any time (the most current version of the file). The attachment field in '07 works wonders but it requires you to manually delete each old file link... I'm trying to avoid someone accidently deleting the most current version of an attachment.

  4. #4
    Datagopherdan is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Dec 2008
    Posts
    220
    If you want to do the extra work then you can do something like this.

    Code:
    Dim fd As FileDialog
    Dim strDefaultDir As String
    Dim strFolderPath As String
    'Set the default directory
    strDefaultDir = "C:\"
    Set fd = Application.FileDialog(msoFileDialogFilePicker)
    'Get the user's selection and add it to the import field, which will be used during the import ops.
    With fd
        .InitialFileName = strDefaultDir
        'Ensure that a selection was made
        If .Show = -1 Then
            Me.txtFileLoc = fd.SelectedItems(1)
    
        Else
            MsgBox "You must select a file.", vbInformation
                Exit Sub
        End If
    End With
    You could just create a table and have "txtFileLoc" as a field in your table and another field for the date with the current date set as the default value. Then it would be easy to manipulate it however you wanted.

    Quote Originally Posted by kaylachris View Post
    I know of the attachment field in '07 but I was looking for a solution a bit more sophisticated. I want only 1 file to be displayed at any time (the most current version of the file). The attachment field in '07 works wonders but it requires you to manually delete each old file link... I'm trying to avoid someone accidently deleting the most current version of an attachment.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Hyperlink in Report?
    By cadsvc in forum Reports
    Replies: 0
    Last Post: 05-11-2010, 07:27 PM
  2. Hyperlink Help
    By smikkelsen in forum Access
    Replies: 9
    Last Post: 03-12-2010, 11:28 AM
  3. have hyperlink use own name/text
    By airhud86 in forum Access
    Replies: 1
    Last Post: 12-16-2009, 09:35 AM
  4. Hyperlink problem
    By peterl in forum Programming
    Replies: 0
    Last Post: 01-13-2009, 07:21 AM
  5. help with dynamic hyperlink to pdf
    By iresolver in forum Access
    Replies: 0
    Last Post: 12-24-2008, 01:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums