Results 1 to 2 of 2

Thread: allow now typing into a drop down combo box

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2000
    Location
    bebenia, PA, USA
    Posts
    241
    I have a drop down combo box and the users do not want any of the items in the list to default so I need it to generate and error if anyone tries to type text into the field.

    I did an on key press subroutine but it still allows one character to be saved if they do it a certain way. Any one got any ideas on how to fix this:

    heres my code:

    cboCategory.Text = ""
    MsgBox "Please only select from the list of choices"
    cboCategory.Text = ""
    code still can allow an accidental saving of one character like "f" or whatever key last pressed
    items in my list

    Accounting
    Misc
    Service
    Enforcement
    Coll & Dist

    these are bound to fields in an Access database

    thank you

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177
    Why don't you just set the Combobox's Style Property to 1 - Dropdown List, then they would be forced to only select items from the dropdown list.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width