Results 1 to 8 of 8
  1. #1
    babak.nourani is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2011
    Posts
    6

    Search Combo box malfunction

    Hi,

    I have a Main form with a Combo box. I created the Combo box by wizard to find a record in that form.
    I works perfectly.

    I have another form with a button. When the button pressed the Main form for a specific record will open.
    It works perfectly too.

    The problem is whenever I jump(by pressing the button) from the other form to the Main form the Combo Box does not work anymore. It does not search and pick up records.

    When I close the Main form and open it again the problem disappears.


    It seems that it just does not work when I jump from the other form to the Main form. But when I open the Main form directly it work perfectly.



    Would you please consider this,
    Thank you.

  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,521
    How are you opening the main form from the other form? It sounds like you're opening it with a wherecondition, so it would only have those records available.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    babak.nourani is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2011
    Posts
    6
    Yes, it is a where condition.
    Is there any way to make it works?


    Regards.

  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,521
    I have heard that you can "remove" the wherecondition with

    Me.FilterOn = False

    Try that and see if it works.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    babak.nourani is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2011
    Posts
    6
    Where should I put the "Me.FilterOn = False"?
    Beside the where condition?

    Regards.

    Quote Originally Posted by pbaldy View Post
    I have heard that you can "remove" the wherecondition with

    Me.FilterOn = False

    Try that and see if it works.

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Well, you've opened the form filtered to a given record or records, so at whatever point you want to open the form back up to all records. Perhaps in your combo code before it searches for a record. You might also consider this method of opening the form:

    http://www.baldyweb.com/Bookmark.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    babak.nourani is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2011
    Posts
    6
    My Where condition is ="[Com_Name]=" & "'" & [Com_Name] & "'"
    would you please tell me in my case what would the new code should be?



    Regards.

    Quote Originally Posted by pbaldy View Post
    Well, you've opened the form filtered to a given record or records, so at whatever point you want to open the form back up to all records. Perhaps in your combo code before it searches for a record. You might also consider this method of opening the form:

    http://www.baldyweb.com/Bookmark.htm

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Your value is text, so the variable would have to be declared as String, and the FindFirst value would need to be surrounded by single quotes, just like your wherecondition.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. combo box to search multiple fields
    By jo15765 in forum Forms
    Replies: 21
    Last Post: 12-23-2010, 03:28 PM
  2. Binding a Combo Box Search Result
    By cvansickle in forum Forms
    Replies: 2
    Last Post: 12-06-2010, 11:03 AM
  3. Help with a search feature or combo box
    By jmanis in forum Forms
    Replies: 14
    Last Post: 07-06-2010, 06:38 AM
  4. Simple list/combo search fails
    By Dega in forum Forms
    Replies: 4
    Last Post: 02-08-2010, 08:39 AM
  5. Recalling Records from a Combo search
    By Dreamcatcher in forum Forms
    Replies: 0
    Last Post: 08-18-2008, 07:33 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