Getting a query to work

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CLSkcab
    New Member
    • Aug 2014
    • 26

    Getting a query to work

    Background: Frontend- MS Access 2010/VBA Backend- MS SQL Server 2008

    DB02001 Table (Parent)
    SupplierID int (primary key)
    Supplier varchar(50)
    .
    .


    DB02003 Table (Child)
    EvalID int (primary key)
    SupplierID int (points back to DB02001 table)
    Status varchar(8)
    EvalDate datetime
    .
    .

    I am trying to get a query to work but no such luck. On a unbound form I have a combo box labeled Supplier that reads all suppliers and provides a drop down list to pick from. It uses the DB02001 table and displays Supplier . This works.

    I have a query that that selects EvalID, SupplierID, Status and EvalDate from the DB02003 table. What I would like to do is pick all suppliers from the combo box field and display them in the query. This is where I need help.


    Supplier Acme Supply v

    EvalID SupplierID Status EvalDate
    1 15 Complete 7/15/2014
    4 15 Due 10/15/2014

    Thanks in advance.
  • twinnyfo
    Recognized Expert Moderator Specialist
    • Nov 2011
    • 3657

    #2
    Add the value of the combo box on your form as the criteria for the second query.

    Code:
    Forms![Form Name].[ComboBox Name]
    Hope this helps.

    Comment

    • CLSkcab
      New Member
      • Aug 2014
      • 26

      #3
      Sorry but could you be more specific? Where do I put this?

      Comment

      • zmbd
        Recognized Expert Moderator Expert
        • Mar 2012
        • 5501

        #4
        You've provided precious little information about your form and the structure of the underlying recordsource and code.

        However, take a look here:[*]How to select Records in an Access Subform from a Combo Box
        even if not exactly what you are after, this should explain the cbox enough to get you where you need to go..

        In fact, you might find all of these helpful at somepoint with the filtering...

        Never fear if you get lost with this, just let us know.
        -filtering-
        Last edited by zmbd; Aug 28 '14, 10:40 PM.

        Comment

        • CLSkcab
          New Member
          • Aug 2014
          • 26

          #5
          Thanks everyone. I got it to work. The reading did help.

          Comment

          Working...