Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    May 2002
    Location
    Toronto, Ontario, Canada
    Posts
    314
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Disabling?? hyperlinks... (2000 SR-3)

    I'm just curious about something... When certain criteria is met, I do things like set Enabled to False for controls like Command Buttons, Text Boxes, Subforms, etc... In this case I want to "disable" two different types of controls ...namely Labels and Images... that have a value in the Hyperlink Address property... Since there's no Enabled property for those two control types, I can't do that... Does anyone know the best way to do this? ... Thanks in advance... <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  2. #2
    Star Lounger
    Join Date
    Jan 2003
    Location
    Grass Valley, California, USA
    Posts
    88
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Disabling?? hyperlinks... (2000 SR-3)

    Trudi,

    When faced with similar problems, I've opted to use the "Visible" property to force the label or image to become invisible until needed.

    Alternatively, for the label control at least, you could define the label area as a command button, and set the other properties of the button such that it looks like a label. The command button can be set inactive by simply clearing all related events. Actually, you might be able to use the command button to also replace the image control, as well (though I've never tried it).

    -- Jim

  3. #3
    3 Star Lounger
    Join Date
    May 2002
    Location
    Toronto, Ontario, Canada
    Posts
    314
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Disabling?? hyperlinks... (2000 SR-3)

    Thanks Jim! I thought about that... It might end up that I have to do that... I'm helping someone else with their database and I was hoping to not have to get them to change form design at this stage... but... whatever works right? lol...

  4. #4
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Richland, Washington, USA
    Posts
    407
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Disabling?? hyperlinks... (2000 SR-3)

    Trudi,

    Another option may be to set the hyperlink property to a null string when disabled and to the intended address when enabled. This has the disadvantage (for labels and images) that it's not obvious, appearance-wise, when they're enabled vs. disabled.

    A more cumbersome approach would be to have two overlapping controls - one that looks the way you want it to look when things are enabled (including the hyperlink address) and another one (on top of it) to look the way you want it to look when disabled -- maybe a different image or a differently colored label. Then set visible to true for the former and to false for the latter when you want it enabled and vise versa when you want it disabled.

    These both, of course, require some "design changes" which you are apparently trying to avoid.

  5. #5
    3 Star Lounger
    Join Date
    May 2002
    Location
    Toronto, Ontario, Canada
    Posts
    314
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Disabling?? hyperlinks... (2000 SR-3)

    Thanks Tom!

    I did think of setting the hyperlink property to a null string but there are quite a few of these images and labels to deal with... I also had the idea of removing the value from the hyperlink address property itself... and adding some code in the click event to deal with it... I could do a boolean test in that procedure... I like your second idea... Creating Image and labels over top of one another... and making the right ones visible at the right time... I could name all of the "disabled" ones with the same prefix and see the visible property to true on demand...

    Hmm... Gotta think this one through... I just wanted to check with others to see if I was missing some obvious and simple way of accomplishing this...

    Thanks again! Have a great day! <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •