Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2005
    Posts
    240

    Unanswered: Show Image/Hide Image

    Ok, I have an image on a form that is set to not visible.
    When a user checks the checkbox on the page I want the image to display, but if the checkbox isn't checked then I don't wnat it to display the image.
    I have the correct code in vba to do this, but I can't get it to work at all. I've put it under Form_Load, Form_Open, Form_AfterUpdate, everything I can think of and it still doesn't work correctly.

    Also I have more than one record, and everything is inside a tab control. I have managed to get it to display, but it then displays it for all the other records, even when the checkbox is not checked.

    Anyone any ideas?

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by KevCB226
    Ok, I have an image on a form that is set to not visible.
    When a user checks the checkbox on the page I want the image to display, but if the checkbox isn't checked then I don't wnat it to display the image.
    I have the correct code in vba to do this, but I can't get it to work at all. I've put it under Form_Load, Form_Open, Form_AfterUpdate, everything I can think of and it still doesn't work correctly.

    Also I have more than one record, and everything is inside a tab control. I have managed to get it to display, but it then displays it for all the other records, even when the checkbox is not checked.

    Anyone any ideas?
    Hi Kev - if the code is correct then why isn't it working? Fancy posting please? Something like (OnCurrent and possibly also Checkbox_AfterUpdate):

    Code:
     Me.ImageControl.Visible = Me.Checkbox
    Is the checkbox control bound? No? Then it has nothing to relate it to the record - it is independant of it - and so will show for all\ be invisible for all

    HTH
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Sep 2005
    Posts
    240
    Got it sorted, your right though, I needed to place in under Current on the Form properties, and in the AfterUpdate properties of the checkbox.

Posting Permissions

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