Results 1 to 6 of 6
  1. #1
    alain17 is offline Novice
    Windows 7 64bit Access 2002
    Join Date
    Apr 2016
    Posts
    11

    How to modify a hyperlink field in an Access form with VBA ?

    Hello,

    in an access form, there is a hypertext field called "Hyperlink"

    Text displayed = "CCP B 001"
    Link to file = "T: \ CERTIFICATION \ AQ \ DAQ \ DAQ_L \ CCP 001.xlsx"
    Tooltip = "CPP number 1: cooking temperature"

    I want to modify this field with VBA so that it becomes:


    Text displayed = "CCP001"


    Link to file = C: \ TEMP \ CCP 001.xlsx "
    Tooltip = "Temporary CPP number 1: cooking temperature"

    How to do this in VBA please ?

    Thanks a lot

    Alain

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    If you get an answer how to do exactly what you've asked for are you going to post back and say something like "it works when it is CCP B 001 but not when it is CCP A 001"? In other words, everything will always be the same?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    alain17 is offline Novice
    Windows 7 64bit Access 2002
    Join Date
    Apr 2016
    Posts
    11
    Hi Micron,
    I'm just looking for an example
    Thanks

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Code:
    With MeYourControlName
      .Target ="C:\TEMP\CCP 001.xlsx" 
      .ControlTipText = "Temporary CPP number 1: cooking temperature"
    End With
    Not sure but I don't think control tip text will work with a bound hyperlink field. You'll get the hyperlink path instead?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    alain17 is offline Novice
    Windows 7 64bit Access 2002
    Join Date
    Apr 2016
    Posts
    11
    Hi Micron,

    Target = OK
    ControlTipText= OK

    but what about the displayed text ?

    What id the proprity for "caption", please ?

    Alain

  6. #6
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    I had to look it up because I've never used the property. Go here when you want to know about any Office program and the properties and methods of its members.
    https://docs.microsoft.com/en-us/off.../api/overview/

    What you specifically want seems to be here in the list of properties
    https://docs.microsoft.com/en-us/off...cess.hyperlink
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 5
    Last Post: 10-22-2020, 01:43 AM
  2. Replies: 4
    Last Post: 04-14-2020, 05:11 PM
  3. Assigning a Hyperlink to a field in a form
    By Beginner72 in forum Programming
    Replies: 3
    Last Post: 03-09-2017, 09:18 AM
  4. Hyperlink from field to form
    By adame in forum Access
    Replies: 4
    Last Post: 02-01-2017, 03:11 PM
  5. Replies: 2
    Last Post: 07-11-2011, 04:51 AM

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