Results 1 to 7 of 7
  1. #1
    darklite is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    41

    Can't find records in combo box


    I recently had a problem with a combo box. Some newest records aren't found when typing in the name, yet they show up in the list. Does anyone know of a reason for this? It's been working fine for the last year, but I added some records last weekend and 3 of them don't show up automatically when I type them in. Again, if I scroll the list manually, I can find them.

  2. #2
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    First off, does the combo box's Row Source have a QUERY (or Select statement) with an ORDER BY clause on it? It needs to be sorted. Then it should show up like it should. Just having the row source as the table or an unordered query will not guarantee the records will show up in the order they need to be in order for the AutoComplete to work. They need to have a sort applied.

  3. #3
    darklite is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    41
    Hi Bob,

    Thanks for the reply. This is what I have: SELECT Table1.ID, Table1.TITLE, Table1.Number FROM Table1;

    Since I'm no access genius, I used the wizard to create it. I was trying to get the list to sort alphabetically which it does for the most part, but I can still get entries that are not alphabetical even after updating.

  4. #4
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Change this:

    SELECT Table1.ID, Table1.TITLE, Table1.Number FROM Table1;

    to this:

    SELECT Table1.ID, Table1.TITLE, Table1.Number FROM Table1 ORDER BY Table1.TITLE;

    And see if that fixes it. It should. But when adding new records you may need to requery that combo box in the After Update event of the form to which the new records are added. If it is on a different form it would go in the VBA window and be:

    Forms!FormNameHere.ComboBoxNameHere.Requery

    and if the combo is on the same form that the data is being added to, then it would be:

    Me.ComboBoxNameHere.Requery

  5. #5
    darklite is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    41
    Thanks bob, but isn't there a simpler way for adding records in the future? This form is for an amazon store and I'll be adding like crazy. I'd hate to have to go into the vba everytime I add a record.

    Aside from the combo box, or the search box at the bottom of the form window, do you of any other easy way to search items? Something I can create? Thanks.

  6. #6
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Quote Originally Posted by darklite View Post
    Thanks bob, but isn't there a simpler way for adding records in the future? This form is for an amazon store and I'll be adding like crazy. I'd hate to have to go into the vba everytime I add a record.
    Well you obviously have some thought which I have no clue where it came from. The VBA is something you write ONCE. From that point on it just happens whenever you add a new record in the form (if you have put the requery code in the form's After Update event). You don't go into the VBA every time you add a record. The database runs that code every time you add a new record.
    Aside from the combo box, or the search box at the bottom of the form window, do you of any other easy way to search items? Something I can create? Thanks.
    So, what's wrong with your current method? I'm not understanding how my giving you the answer to getting the value to show up in the combo box correctly changes anything.

  7. #7
    darklite is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    41
    Well you obviously have some thought which I have no clue where it came from.

    Well, starters I know noting of vba, yet most everyone assumes I do, so that would lead me to believe that it needed to be updated everytime I make a change. I'll give these things a shot and see how it goes.

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

Similar Threads

  1. Replies: 5
    Last Post: 11-13-2010, 04:56 PM
  2. Replies: 2
    Last Post: 02-17-2010, 09:53 PM
  3. Replies: 1
    Last Post: 01-22-2010, 03:21 AM
  4. Find Records Query
    By sullyman in forum Programming
    Replies: 1
    Last Post: 10-28-2009, 08:49 AM
  5. Find Missing Records
    By Flanders in forum Queries
    Replies: 6
    Last Post: 06-24-2009, 07:02 AM

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