Visible record selection in continuous form (Not using record selector)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TheSmileyCoder
    Recognized Expert Moderator Top Contributor
    • Dec 2009
    • 2322

    Visible record selection in continuous form (Not using record selector)

    I have a situation in which the user is requested to select a new status for the document they are working on.

    As the document status is somewhat complicated, it consists of 3 fields:
    tbl_DocStatus:
    PK_Status (Primary Key, Autonumber)
    tx_Status (Text 25, short status)
    tx_StatusDescri ption (Text 255, long description of what the status means)

    Now the 255 characters of the description is to long in my opinion to properly show in a listbox, so I want to display a popup form, which in style looks like the image I have attached:
    [IMGnothumb]http://bytes.com/attachments/attachment/6758d1354874728/selectstatus.jp g[/IMGnothumb]

    Just ignore the text, its danish :)

    Now I would like for the user to be able to use the radio button (or similar) for selecting the new status. But of course since this is unbound, selecting 1 radio button selects them all.

    Does anyone have a good way of indicating in a continues form which record is the selected one? I do realize that access comes with a built in record selector but I find it so darn ugly, and want it to be hidden.
    Attached Files
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32633

    #2
    Unless you want to use the Format event, you need to ensure the table has a boolean field so you can bind the control (It can be a Radio Button.) to it and show it in the form. Let me know if this is not adequate. I believe I've seen suggestions somewhere for showing different values in unbound controls in spite of Why Values in Unbound Form Controls do not Persist.

    Comment

    • TheSmileyCoder
      Recognized Expert Moderator Top Contributor
      • Dec 2009
      • 2322

      #3
      I don't see the option of adding a boolean field to the table itself, as it is a shared table from the backend. It "could" in theory be moved and saved as a local table without too much trouble, except for the fact that I would need to update the client in order to make any changes to the table.

      Your suggestion did however give me an idea I will try out, using a join to a selection table. I will try it and report back (of course :O)

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32633

        #4
        That's where my thinking led too Smiley. If it proves fruitful we may have a decent and reusable concept on our hands ;-)

        PS. I'm out now till Sunday probably, but will pick up on my return.

        Comment

        • TheSmileyCoder
          Recognized Expert Moderator Top Contributor
          • Dec 2009
          • 2322

          #5
          I created an extra table:
          tbl_Selection
          ID (Long)
          bSelect (Long)

          I then left joined it to the original table on ID=PK_Status, and bound the bSelect to the radio button. Voila, I can now select 1 or more records. Of course now comes some extra overhead with clearing the tbl_Selection when the form opens, and possibly some code to handle whether or not multiselect is allowed, but that should be manageble.

          Thank you for the inspiration NeoPa.

          Comment

          • TheSmileyCoder
            Recognized Expert Moderator Top Contributor
            • Dec 2009
            • 2322

            #6
            So this is how my custom record selector ended up looking. I will try to post in more details how it is accomplished when I get the chance. For now I just wanted to show it off:
            http://www.youtube.com/watch?v=iv3i3tSPJrU

            Comment

            • NeoPa
              Recognized Expert Moderator MVP
              • Oct 2006
              • 32633

              #7
              Good work Smiley :-)

              Remember though, if you want to be able to reuse the table generically across multiple forms then you may also need to introduce a job or form identifier into the table ;-) That way data for more than one form can be maintained simultaneously without the two sets of data interfering with each other.

              Comment

              Working...