Access 2007 Combo Boxes: Setting Default Value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kmartinenko
    New Member
    • Jan 2008
    • 12

    Access 2007 Combo Boxes: Setting Default Value

    Hi everyone,

    I have several combo boxes on my form, and while I have designated a column head, I cannot figure out how to default to the column head value. What I really want is for all of my combo boxes to default to a selection that is either blank or the column head, so that my users don't see their previous selection when they go and select a value from the drop down list.

    Also, what would be the best way to enable a user to clear out a form (reset all combo boxes to blank fields) so that they aren't running a report on a previous entry? I have tried creating a reset form command button, and while it is effective in function, it doesn't automatically clear the previous selections out and return each combo box to its default value.

    Thanks,

    Kindra
  • rsmccli
    New Member
    • Jan 2008
    • 52

    #2
    Originally posted by kmartinenko
    Hi everyone,

    I have several combo boxes on my form, and while I have designated a column head, I cannot figure out how to default to the column head value. What I really want is for all of my combo boxes to default to a selection that is either blank or the column head, so that my users don't see their previous selection when they go and select a value from the drop down list.

    Also, what would be the best way to enable a user to clear out a form (reset all combo boxes to blank fields) so that they aren't running a report on a previous entry? I have tried creating a reset form command button, and while it is effective in function, it doesn't automatically clear the previous selections out and return each combo box to its default value.

    Thanks,

    Kindra
    What is the code on your reset form command button and the names of your combo boxes?

    How could the reset form command button be "effective in function" but still not do what you want it to. Just wondering.

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32656

      #3
      The usual way to set a ListBox or ComboBox to a particular value is a little strange, but it is to set the value of the control to the value of the line you want selected.

      In your case I would try setting it to either the text in the heading or blank, depending on what's required.

      Comment

      Working...