• Display image at current record (A97)

    Author
    Topic
    #453646

    Would like to display an image at the current record of my continuous form subform. On the Form Load event is the following:
    Forms!frmArchive!sfrmArchiveRecords![Image1].Visible = False.
    In the On Current event of the subform is: Me![Image1].Visible = True. When initially opening the form there are no images displayed. When moving to another record, all records display an image. Is what I am trying to achieve possible?

    Thanks
    Ron

    Viewing 1 reply thread
    Author
    Replies
    • #1124176

      Do you have a specific reason for setting the Visible property to False in the On Load event? What happens if you omit that line from the On Load event?

      • #1124180

        If I remove the that line from the On Load event, when the form opens, all records have the image. The purpose of the image (a small arrow) is to act as a record selector or marker for the current record.

        • #1124182

          In a continuous form, a control is either visible in ALL records or invisible in ALL records. It is not possible to make it visible in just a single record. So you’ll have to think of something else – why not use the built-in record selector? It displays a triangle in the active record.

          • #1124186

            The built in record selectors will work just fine. Is there a way to prevent the user from doing a Ctrl A and then pressing the Delete key? That was what I was trying to avoid.

            Thanks,
            Ron

            • #1124188

              You’d have to create an event handler for the Before Delete Confirm or On Delete events, I think.

            • #1124193

              I will look into that. Thank you.

              Ron

    • #1124220

      The attached demo shows how you can achieve the goal of your original post, but not by using an image. Instead there is a text box with conditional formatting which makes it appear whenever it is the current record.
      I use something like this when I want something more obvious than the built-in record selectors.

      • #1124241

        Thank you for the information. That is what I was looking for. What keyboard combination creates the pointer figure? The other issue I my have is incorporating it into Access 97 because that version does not have conditional formatting.

        Thank you
        Ron

        • #1124245

          Sorry I did not notice that you were using 97. You are right that this will not work there, as conditional formatting is not available.
          There was something similar, but even more convoluted, that worked in 97, but I would need to hunt it up. From memory, all it would do would be give a rectangular block of color.

          To get the arrow, I inserted it into Word using Insert Symbol, then copied into Access.

        • #1124249

          See “Highlight a single row” on Liquorman, Inc.: Access Tips, Links, & Downloads, and also the attachment to post 227,142 for Access 97 methods.

        • #1124252

          Check out Mark Liquorman’s site, e has something similar that colours the whole of the pointed record.

        • #1124269

          Here is a version of what I posted before that works in 97. Using the idea that the Hans and Patt have pointed us to.

          • #1124280

            Thanks everyone for all the help. That is just what I was looking for.

            Ron

    Viewing 1 reply thread
    Reply To: Display image at current record (A97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: