Results 1 to 4 of 4
  1. #1
    Britsical is offline Novice
    Windows Vista Access 2007
    Join Date
    Sep 2014
    Location
    Alberta, Canada
    Posts
    2

    Help! I don't know how to assign hyperlinks from table records to form labels using VBA code

    Hello, I am a self taught access user trying to build a simple database to act as a central repository of information for our projects dept, basically to replace a 102 column excel spreadsheet. We have a number of live projects, each one has a set number of supporting documents stored in individual project directories on our intranet.The Excel spreadsheet had columns of schedule data, cost data, resources and general references, so I have split this data into four tables (schedule, cost etc) with a direct relationship based on unique project ID numbers in each table. So, each project in the general reference table have a direct one to one relationship with corresponding fields in the other tables. One of these tables contains fields with hyperlinks to the locations of the projects supporting documents.



    I would like to create a form with the supporting project documents represented by labels. As the user moves through the projects (different records in the projects list) using the navigation buttons I would like to assign the correct hyperlink for that specific project directory to the labels. I have tried using macros, code builder and text fields instead, but I can't get this to work.
    Ideally I could display the label as an hyperlink IF the corresponding hyperlink field was populated, and only load the correct hyperlink and follow it when the label was clicked. However that is the ultimate dream, and I would be very happy with any method that can assign hyperlinks on the fly to these labels. Can anyone help please?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Why don't you just use a textbox bound to the field?

    Programmatically setting properties of controls in form set to Continuous or Datasheet view won't work. The property setting is reflected in all records.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Britsical is offline Novice
    Windows Vista Access 2007
    Join Date
    Sep 2014
    Location
    Alberta, Canada
    Posts
    2
    Thanks for the quick response June7. I could use the text box bound to the field and use the attached label to indicate the document type. I was trying to make this more professional looking, i.e not showing the hyperlink, only the
    document name. However, after six hours of trying various ways to achieve what I want I think the simplest approach is probably the best.
    Thanks June7!

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    How is the hyperlink stored? In a hyperlink field? Review http://www.allenbrowne.com/casu-09.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Assign a value to multiple records in a totals query
    By mercapto in forum Programming
    Replies: 8
    Last Post: 02-27-2013, 02:16 PM
  2. Auto Assign ID to new records
    By swadson in forum Access
    Replies: 8
    Last Post: 09-10-2012, 01:37 PM
  3. VBA code for adding records to a table
    By pwalter83 in forum Forms
    Replies: 3
    Last Post: 12-21-2011, 10:52 AM
  4. Replies: 2
    Last Post: 03-27-2010, 10:52 AM
  5. Replies: 1
    Last Post: 05-27-2006, 12:35 PM

Tags for this Thread

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