Results 1 to 2 of 2
  1. #1
    geraldk is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    49

    Combo Search

    Hello,



    I am looking for code that will allow me to search something in a combo box and then go to a record. At the moment I this being done in a marco, which I am not a fan of. I prefer vba code myself, more control.

    Here is that I have in the macro:

    ="[EmpID] = " & Str(Nz([Screen].[ActiveControl],0))

    I do have some code that used to work with Access 2003 but some reason it does like Access 2007/2010

    Code:
    Dim rs As Object
    Set rs = Me.Recordset.Clone
    rs.FindFirst "[EmpID] = " & Str(Me![cboSearchName])
    Me.Bookmark = rs.Bookmark
    Any Help would be appreciated.

    Thank you.

  2. #2
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    The code structure is still valid.

    You can convert your macro to code by opening the form in design view and selecting the option to convert (right hand side of the ribbon).

    Are getting any errors or is it just not working?

    What is the data type of the EmpID field in the form's underlying record source? What is the bound field of the combo box?

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

Similar Threads

  1. Search Combo Box
    By joesmithjunior in forum Access
    Replies: 3
    Last Post: 11-20-2011, 06:25 PM
  2. Replies: 4
    Last Post: 08-16-2011, 05:54 PM
  3. search as you type in combo box
    By pratim09 in forum Forms
    Replies: 3
    Last Post: 08-05-2011, 07:46 AM
  4. Search Combo box malfunction
    By babak.nourani in forum Forms
    Replies: 7
    Last Post: 01-20-2011, 07:37 PM
  5. Help with a search feature or combo box
    By jmanis in forum Forms
    Replies: 14
    Last Post: 07-06-2010, 06:38 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