Results 1 to 5 of 5
  1. #1
    andigirlsc is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2014
    Posts
    8

    Smile Combo box returning wrong results in Access 2010

    I have an unbound combo box that I set up in a form using the combo box wizard
    in Access 2010. I selected the option that says, “Find a record on my form based
    on the value I selected in my combo box.” The problem is that the combo box will
    not always display the correct record. It seems to only display the first record
    of a group of similarly named records in a table. I have found similar posts,
    but no solution.

    Example:
    Code:
      
    Last Name  First Name  SSN
    Smith      Alex        123-45-6789
    Smith      Jane        234-56-7891
    Smith      Mary        345-67-8910
    If I select Smith Jane, the record for Smith Alex will display. I know that this has something to
    do with the bound column property, but I am unsure what to do to fix the issue.

    What I have tried:
    I tried setting the primary key as the
    first field, but then I could only search by the primary key, which is
    unrealistic for this database. Users will be searching based on last name. How
    do I make the combo box select whichever record I select from the drop down


    list?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    As shown, the bound column should be 3.
    Smith may show, but inside the combo , it = [ssn]

    You could combine the columns 1 & 2 ( [last] & "," & [first] as Name ), because when you pick Jane smith, you will only SEE smith. (what value is that with 3 smiths?)
    that way you see SMITH,JANE, and the bound col = 2

  3. #3
    andigirlsc is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2014
    Posts
    8
    SOLVED (for now)

    I scrapped the combo box and started the wizard again. Then, I set the SSN as the first column, (which is the primary key) allowed it to be hidden and the combo seems to work fine. I thought it would force me to search by primary key if I did this, but it didn't.

  4. #4
    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
    Everyone be aware that this is cross-posted at

    http://www.dbforums.com/microsoft-ac...ss-2010-a.html

    Please, if you are going to cross-post, mention that fact in your all of the identical posts. This helps to prevent the volunteers who give of their time from wasting that time by working at cross purposes; giving responses that have already been given elsewhere, even giving responses to a problem that has already been solved elsewhere.

    Thanks.

    Linq ;0)>

  5. #5
    andigirlsc is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2014
    Posts
    8
    Sorry. I only cross-posted (which I wasn't aware was an issue) because some forums get quicker responses than others. Also, some responses are more helpful than others. I never post when there is already a working solution available. I will mention that it is cross posted next time.

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

Similar Threads

  1. Replies: 1
    Last Post: 10-30-2012, 10:29 AM
  2. Dataset returning different results
    By Juan23 in forum Programming
    Replies: 8
    Last Post: 09-16-2011, 03:03 PM
  3. Expression gives wrong results
    By newtoAccess in forum Queries
    Replies: 22
    Last Post: 12-03-2010, 12:21 AM
  4. Query not returning all of the results
    By velvettiger in forum Queries
    Replies: 4
    Last Post: 03-11-2010, 06:56 AM
  5. DMax returning wrong value
    By nedbenj in forum Access
    Replies: 7
    Last Post: 10-24-2007, 10:30 AM

Tags for this Thread

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