Results 1 to 7 of 7
  1. #1
    Join Date
    May 2012
    Posts
    5

    Access 2007: Got rid of drop-box control (i.e. combo w/key entry restricted)?


    Did they get rid of the drop box control?

    I have a form with a combo box that is sourcing values from a table. I have "restricted to list" property set on, but users can still enter blanks. This is no good. I need a drop box that does not allow users to type in the box.

    Seems simple. Why can't I find it?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    The Limit to List property should restrict them to selections on the list, whether they type or select. If you want to make sure they enter something (not leave it blank), you could make the field required in the table.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Join Date
    May 2012
    Posts
    5
    Actually, that is not an option because the combo box is unbound.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    Are the users "entering" a blank or simply leaving it blank? I'm not sure what you're doing with the combo, but you may want to test for the blanks before doing whatever you're doing.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Join Date
    May 2012
    Posts
    5
    Leaving it blank is not an issue because it won't try to pull-up a record until the user enters something. I am trying to limit users from entering a blank to keep my database air-tight.

    I decided to just go with a list box, but am disappointed a drop-box control does not seem to be available in Access 2007.


    Quote Originally Posted by pbaldy View Post
    Are the users "entering" a blank or simply leaving it blank? I'm not sure what you're doing with the combo, but you may want to test for the blanks before doing whatever you're doing.

  6. #6
    TG_W is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2010
    Location
    Manvel, TX
    Posts
    299
    What about a validation rule or some other coding that stops the code and pops up a message box if the combo box is left blank?

  7. #7
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by GlistEngineering View Post

    ...I decided to just go with a list box, but am disappointed a drop-box control does not seem to be available in Access 2007.
    The Combobox certainly is available in v2007! I'm not exactly sure how you enter 'blanks,' but if your quest is for "a drop box that does not allow users to type in the box," as you posted, you can use the KeyDown event of the Control:
    Code:
    Private Sub ComboBoxName_KeyDown(KeyCode As Integer, Shift As Integer)
     Select Case KeyCode
      Case vbKeyReturn, vbKeyTab, vbKeyUp, vbKeyDown
       KeyCode = KeyCode  'Accept these keys
      Case Else
       KeyCode = 0 ‘Block all other keys
     End Select
    End Sub
    Linq ;0)>

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 02-20-2012, 10:18 PM
  2. Access 2007 trying to make a control source tick box
    By blueyedsamurai in forum Database Design
    Replies: 18
    Last Post: 11-22-2011, 01:21 AM
  3. Access 2007 - Form control with VBA
    By washington in forum Forms
    Replies: 1
    Last Post: 07-18-2011, 08:39 AM
  4. Invalidating dropdown control on Access 2007 ribbon
    By kenwarthen in forum Programming
    Replies: 0
    Last Post: 08-16-2010, 09:29 AM
  5. Simultaneous Data Entry for Access 2007
    By matt.smith in forum Access
    Replies: 1
    Last Post: 05-27-2010, 03:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums