Results 1 to 5 of 5
  1. #1
    DTO. is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Dec 2020
    Posts
    48

    How can I add dynamic hyperlink behind the button?


    Hello everyone,

    I have one query field which is storing the dynamic query value. This value is refering to the hyperlink and for going each next or back record it is changing dynamically. I have added one button which is needed to go to this hyperlink's folder considering this dynamic query value.

    How can I code behind button? Thanks for your help.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Is the field a Hyperlink type? Or is it just a simple text field with a path string? Review http://allenbrowne.com/func-GoHyperlink.html

    Another option is to build a hyperlink string in a textbox. A clickable hyperlink is composed of 3 parts separated by # character. So if your field is complete folder path:

    ="#" & [fieldname] & "#"

    Set textbox IsHyperlink property to Yes.
    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
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,001
    I would personally avoid hyperlink fields and just store the full interwebs path, then use application.followhyperlink or something similar in the click or (preferred) double click event.

    Hyperlinks can't be upscaled into another RDBMS and as soon as you try and do anything with them they get very confusing (IMHO), I see lots of posts regarding the Hyperlinks not working etc.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  4. #4
    DTO. is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Dec 2020
    Posts
    48
    Thanks FollowHyperlink (Dynamichyperlink) statement is being worked.
    In this time I would like to create this dynamic folder with MKDIR function in case the folder was not manually created before. However MKDIR is not working in a same way with Followhyperlink. How can I define dynamic link statement with MKDIR ?

  5. #5
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,861
    Show what you have tried?

    Why are you allowing an entry where the folder does not exist?
    Why not use the File Dialog to select a folder/file?

    If you have c:\temp and you want to store in c:\temp\folder1\folder2\folder3, then you need to make each in turn.?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

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

Similar Threads

  1. Creating a Browse button to create a Hyperlink
    By detaylor1242 in forum Forms
    Replies: 5
    Last Post: 07-30-2013, 11:48 AM
  2. Add button to follow hyperlink in table
    By stanley721 in forum Forms
    Replies: 6
    Last Post: 06-22-2013, 08:49 AM
  3. Dynamic button lables using Dlookup
    By frostnuts in forum Access
    Replies: 9
    Last Post: 03-20-2013, 10:01 AM
  4. Command button as a Hyperlink
    By Alaska1 in forum Access
    Replies: 3
    Last Post: 10-21-2010, 02:08 PM
  5. help with dynamic hyperlink to pdf
    By iresolver in forum Access
    Replies: 0
    Last Post: 12-24-2008, 01:21 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