How to strike out link in Access DB after single click

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ydw1985
    New Member
    • Apr 2014
    • 1

    How to strike out link in Access DB after single click

    I have a form designed in Access DB where several hyperlinks of different tables or webpages are provided & I want to strike out each hyperlink after I click on it.

    Next day... when I re open the same Access database... all those hyperlinks should be again available to access.

    Please assist.
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    If you just want the colour to change, the format the field as hyperlink.

    If, by "strike out" you want interpreted as to be "remove" from the list.

    The easiest way I see to do this:
    Form
    Unbound list box
    on load/open event
    code to open the recordset with your hyperlinks
    code to then read each record and using the additem method add each to the list box

    In the listbox, on double-click event
    code to read the currently selected item... if this is the hyperlink itself then send the link to the default browser, else then pull that information from the data tables
    code to remove the selected item by using the removeitem method.

    With the listbox being unbound, there's no alterations to the original datatable.

    There are other methods such as using a seperate table, a field in the same table, an array, etc... to keep track of and filter out the already followed links.



    Once you write your code, please perform the basic troubleshooting as outlined here ( > Before Posting (VBA or SQL) Code ) if you have any further issues let us know.
    Last edited by zmbd; Apr 15 '14, 02:08 PM.

    Comment

    • Seth Schrock
      Recognized Expert Specialist
      • Dec 2010
      • 2965

      #3
      You could do it a couple of different ways. You could change the data type for that field to Memo and set it to rich text and then it should remember the strike-through on it own. Or if you are using the Hyperlink data type and need the functionality that it provides, you could add a Yes/No field and set this to true when you click the hyperlink. Then when you display the record the next time, you could just check the yes/no field to know if it needs to add the strike-through.

      Comment

      Working...