Results 1 to 3 of 3
  1. #1
    rhuseman is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    1

    Use 2 Combo Boxes to look up Record and Display it in a form

    Below I have a link to a video to help explain my question and problem. I am wanting to search for existing records in a table by using 2 combo boxes. One combo box will choose an existing variable (the part number) and the other combo box with control another existing variable (operation number). copy the following link to browser


    http://www.youtube.com/watch?v=r6hDy5EQ-4w

    I need some input and help to figure this out.

  2. #2
    DepricatedZero's Avatar
    DepricatedZero is offline Cthulhu Fhtagn!
    Windows 8 Access 2007
    Join Date
    Apr 2013
    Location
    Cincinnati
    Posts
    65
    Can't watch the video right now but

    You can target your combos from a specific query to set your criteria like so

    Under "Where" for Criteria enter something similar to Forms!frmContainingControls.ctrlThatHasVariable

    Then you can design a custom query that checks those controls for its criteria

  3. #3
    dccjr's Avatar
    dccjr is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2012
    Location
    Colorado Springs, CO
    Posts
    138
    I created multi-variable searches similar to what you are talking about as follows. Since I am still relatively new at Access VBA, I am not sure how eloquent or efficient it is, but it works.

    Code:
    strSQL = "SELECT * FROM [tbl_Name] WHERE PartNo= '" & Me.cbxPatNo & "' AND OpNo= '" & Me.cbxOpNo & "'"
    I used combo boxes to help eliminate user typo errors with textboxes when searching. What type of control are you using to display the result(s)? Hope this helps.

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

Similar Threads

  1. Replies: 9
    Last Post: 06-04-2014, 10:45 AM
  2. Replies: 2
    Last Post: 04-04-2013, 05:56 PM
  3. 2 Column Combo Boxes in display.
    By ThebigCt in forum Forms
    Replies: 10
    Last Post: 02-23-2012, 12:28 AM
  4. Combo Boxes always display first record of table
    By LilMissAttack in forum Forms
    Replies: 4
    Last Post: 08-12-2011, 11:36 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