7 Replies Latest reply on Jul 10, 2010 4:30 PM by mattb

    Question about dropdowns

    mattb

      Title

      Question about dropdowns

      Post

      Are dropdowns always editable?  I would like to have a dropdown display data from a value list and have the user make a choice from the value list, but I don't want the user typing in the box or erasing or changing the value that the value list put in.  Must I use popups to achieve this non-editing state?  Or am I missing something here?

      Matt Bloomfield

        • 1. Re: Question about dropdowns
          sunmoonstar.13

          One solution:

          Manage database > Tables tab > Double-click relevant table > Double-click relevant field to open Field Options > Validation tab > Uncheck "Allow user to override during data entry" > Check "Member of value list" > Select relevant Value List

          This will validate the dropdown field and force the user to only select values from the specified Value List.

           

          Nick

          • 2. Re: Question about dropdowns
            mattb

            Nick:

            That sounded like a good solution, so I went and tried it but it's still not right.  If I set up validation on the dropdown field as you suggest, what actually happens is that the user can still alter the data, but now an error message pops up saying that an illegal value was entered and gives you the choice to Revert or click the OK button.  Yes, clicking the Revert button will do just that, but what I'm looking for is preventing the user from even being able to alter the data in the first place and never having to see an error message and make a choice.  Can that be done?

            Matt Bloomfield

            • 3. Re: Question about dropdowns
              sunmoonstar.13

              But if a user tries to enter an illegal value, what do you want to see happen? Personally, I think it's a good thing that an error message pops up, indicating to the user that they've done something wrong. And if you customise the message that's displayed, you can provide more information to the user about what they did wrong and tell them to click the Revert button.

              In any case, dropdown lists, by their very nature, lead most users to select from the value list. It will only be the odd rogue user that attempts to enter something different, and if they do, then - WHACK! - they get the rror message. They'll learn to get with the program soon enough, I would think...

               

              Nick

              • 4. Re: Question about dropdowns
                mattb

                Nick:

                > But if a user tries to enter an illegal value, what do you want to see happen?

                I want them not to be able to!  Like on popups, where the value list is displayed and choosable but you can't do anything else.  I would like the dropdown to be read-only, in other words.  I've run into an odd situation which I will have to re-test with your solution, where the user doesn't alter anything, but double-clicks in the dropdown, which inserts a cursor in the middle of the displayed value.  Then when the user next chooses another value from the dropdown's value list, it concatenates those 2 values (the currently displayed one and the next one chosen), which is just a ridiculous situation.  I'll let you know what your method does in that situation after I've tested it...

                Matt Bloomfield

                • 5. Re: Question about dropdowns
                  mattb

                  I just tested for the scenario I mentioned in my last post and it does bring up the "Revert" error message.  And here's a case where the user didn't even deliberately alter the data - they just had the "misfortune" of either accidentally or intentionally double-clicking inside the dropdown data area which leaves you with a blinking cursor and then choosing another value from the list immediately afterwards. 

                  • 6. Re: Question about dropdowns
                    sunmoonstar.13

                    Ok, so why not use a pop-up menu instead of a dropdown list?

                     

                    Nick

                     

                    • 7. Re: Question about dropdowns
                      mattb

                      > Ok, so why not use a pop-up menu instead of a dropdown list?

                      I will if there's no other choice.  I like the esthethics of dropdowns, you have the arrow, the list always opens below the data line.  I'm coming from 2 decades of Visual Foxpro programming where their dropdown lists ("combo boxes") behave like I expect them to.