Results 1 to 5 of 5
  1. #1
    markjkubicki's Avatar
    markjkubicki is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    496

    continuous form to show image ONLY at the record where a field value is true

    i have a continuous form (one line per record)
    each record has an image control, and a control with a boolean value
    i would like for the image to be visible ONLY in the record where the boolean value is TRUE, and not in any of the other records where it is false

    as is, the image only shows when i click a record where the value is true; but then it shows for EVERY record,
    Code:
    Private Sub Form_Current()
    Me.imgAvoid.Visible = Me.txtAvoid
    End Sub
    and when i click a record where the boolean is false, the image goes away, is not visible any EVERY record (even the ones where the value is true)



    i have a hunch that this is one of those: "you'd think there is a work-around, but there is not: i just can't be done" (?)

    Click image for larger version. 

Name:	Show_No-Graphic.jpg 
Views:	19 
Size:	123.7 KB 
ID:	43349Click image for larger version. 

Name:	doNotShow_NO-graphic.jpg 
Views:	18 
Size:	106.6 KB 
ID:	43350

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    continuous form show the same properties for all records. if visible in rec2, then it is for all.

    so say we all.

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Unless you bind a suitable control to a table field that contains an image, you cannot. On a continuous or datasheet form there is really only one of any control. The repeats are 'instances' of that control and if unbound, what you do to one affects the other. The only exception is conditional formatting, but you are limited with what you can do. I think there is a workaround but I have never bothered with it. You can substitute wing ding fonts for images, which I've seen done in combo lists so I think it is possible in a continuous form as well.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    accesstos's Avatar
    accesstos is offline Expert
    Windows XP Access 2007
    Join Date
    Dec 2018
    Location
    Greece
    Posts
    551

  5. #5
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    see this link about using the format property for your txAvoid control to show the image you want

    https://www.access-programmers.co.uk.../#post-1628754

    For your image you might use wingdings ascii 78 (N) for a skull and crossbones or perhaps webdings ascii 120 (x)

    true=-1, false=0

    so you might set the font to webdings and the format property to

    "";[red]"x";"";""

    you will probably also want to set enabled to false and locked to true

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

Similar Threads

  1. Replies: 3
    Last Post: 08-21-2018, 07:40 AM
  2. Replies: 4
    Last Post: 11-21-2014, 09:56 PM
  3. Replies: 4
    Last Post: 04-03-2014, 08:03 AM
  4. Replies: 3
    Last Post: 10-12-2012, 01:38 PM
  5. Show a new image per record in a form
    By Bert Colourama in forum Forms
    Replies: 0
    Last Post: 09-25-2008, 05:22 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