Results 1 to 7 of 7
  1. #1
    CQCDave is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Nov 2014
    Posts
    47

    Unbound Combo box search not working

    I am using MS Access 2010. I have a form Customer Complaints that is bound to a table. On the form i have created an unbound combo box field to use as to search records within that form. I created the combo box with the wizard with CCR# being the only field i selected from the form. The combo box will display the results from the query.The querry selects the ID field and the CCR# field. However when i select an item from the results it will not select the data within the form. The Macro is set up as a Search Record Select the First Record with the Where Condition is ="[ID] = " & Str(Nz([Screen].[ActiveControl],0)

    I have the same function working in other forms, not sure why it isn't working here. Any insights would be helpful.



    Thanks.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Really need better understanding of your data structure and form design. If you want to provide db for analysis, follow instructions at bottom of my post.

    What is the combobox RowSource SQL statement?

    What is the form RecordSource SQL statement?


    Advise no spaces or special characters/punctuation (underscore is exception) in naming convention.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Sounds like you're comparing CCR# to ID.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    CQCDave is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Nov 2014
    Posts
    47
    The query does pull both ID and CCR#, I changed the Where Condition in the macro to read ="[CCR#] = " & Str(Nz([Screen].[ActiveControl],0)) ​with no change in the results.

  5. #5
    JamesDeckert is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2015
    Location
    Salina, KS
    Posts
    262
    your where needs to be the unique field to find the record. if ID and CCR# field (in this order) are used for the combobox and field 1 is bound (may be hidden), then your WHERE should reference ID
    I think that Str(Nz([Screen].[ActiveControl],0) will return with whichever field is bound, so see which field that is and use it for the WHERE, or change the bound field number.

  6. #6
    JamesDeckert is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2015
    Location
    Salina, KS
    Posts
    262

  7. #7
    CQCDave is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Nov 2014
    Posts
    47
    Thanks for the help and sorry for the delay in responding, have been out of the office for a bit. There were several issues that were fixed. The form had also been put into data entry mode during the process. Thanks for the assistance.

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

Similar Threads

  1. Replies: 6
    Last Post: 09-22-2015, 03:30 PM
  2. Replies: 9
    Last Post: 11-06-2014, 01:15 PM
  3. Using unbound form data in query not working
    By Perceptus in forum Queries
    Replies: 4
    Last Post: 10-21-2014, 08:00 AM
  4. Replies: 2
    Last Post: 04-17-2013, 02:12 PM
  5. Combo Box search not working
    By Lowell in forum Forms
    Replies: 1
    Last Post: 06-02-2012, 12:53 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