images used to reflect data/control status

  • Thread starter Thread starter TallGuy5
  • Start date Start date
T

TallGuy5

Guest
I am currently using an couple of small images to relect the true/false status of a number of fields in my database. When the field is true, image.visible = true, when false then .visible = false. Is there a simple way to link an image to a(n invisible) control on the form instead?
 
use the Form_Current event to fire your code

If Me.InvisibleField = true then
Me.Image.visible = true
else
me.image.visible = false
end if

HTH
Dave
 
It get tricker...

Cheers for that code. Now for the trickier bit...

I have a subform containing a list of records each with its own checkbox (which will be made invisible once I've got things working) and small image whos visibility is set by the true/false status of the checkbox. These checkboxes are modified by actions taken in another form. When this other form is closed the checkbox for one of the listed record in the original subform may be changed. If it is changed the visiblity of its companion image should change too.

At the moment what happens is that the checkboxes in the original subform change according to actions in the second form just fine. However, the images do not change visibility. If you exit the form and re-enter (i.e. refresh) the form (and subform) the images do change BUT ALL off the images are affected. i.e. If all checkboxes are unticked/false then no images show, if 1 or more are ticked/true then ALL images show.

Currently the script you supplied is in the subform:

Private Sub Form_Current()

If Me.chkBox16 = True Then
Me.redFlag.Visible = True
Else
Me.redFlag.Visible = False
End If
End Sub


Any thoughts? (I can supply on-line screenshots if that helps).
 
If your subform is a continious form, all the images will change to reflect the image in the currently selected record :(
Something that can be improved in Access is the future.
Dave
 
Well cheers for that nugget of info. At least I wont be wasting any more of my time trying to make it work.

Thanks.
 

Users who are viewing this thread

Back
Top Bottom