Results 1 to 4 of 4
  1. #1
    mikehorse is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    9

    Noob.. Select Query not working when combo box used for criteria

    Hi
    I can't get my query to return any data when trying to use the combo box on a form to define the criteria on the query design. Tthe query does work when I don't have any criteria or manually type the criteria. Any suggestions welcome. Thanks...

    Click image for larger version. 

Name:	Form1.jpg 
Views:	5 
Size:	19.0 KB 
ID:	17631

    Click image for larger version. 

Name:	Query.png 
Views:	5 
Size:	20.6 KB 
ID:	17632

    SELECT
    TblTestSet.[TestSet Name],
    tblTEST.[Test Name],
    tblTEST.[Test Description],
    tblTestCase.TC_Planned_Run_Date,


    tblTestCase.TC_Planned_Tester
    FROM
    tblTEST INNER JOIN (TblTestSet INNER JOIN tblTestCase ON TblTestSet.TestSet_ID = tblTestCase.TC_TestSet_ID) ON tblTEST.TEST_ID = tblTestCase.TC_Test_ID
    WHERE
    (((TblTestSet.[TestSet Name])=[Forms]![Form1]![Combo0]));

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    Try:
    Code:
    SELECT 
    TblTestSet.[TestSet Name],
    tblTEST.[Test Name], 
    tblTEST.[Test Description],
    tblTestCase.TC_Planned_Run_Date, 
    tblTestCase.TC_Planned_Tester
    FROM 
    tblTEST INNER JOIN (TblTestSet INNER JOIN tblTestCase ON TblTestSet.TestSet_ID = tblTestCase.TC_TestSet_ID) ON tblTEST.TEST_ID = tblTestCase.TC_Test_ID
    WHERE 
    (((TblTestSet.[TestSet_ID])=[Forms]![Form1]![Combo0]));
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    mikehorse is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    9
    Hi Bob
    Thanks for the quick response... That worked.

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    I'm glad that worked for you but if you are using lookup fields in your tables see: http://access.mvps.org/access/lookupfields.htm
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

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

Similar Threads

  1. Replies: 6
    Last Post: 05-15-2013, 03:36 PM
  2. Sleepless Combo Select not working on form
    By MadeCurler in forum Forms
    Replies: 8
    Last Post: 11-09-2012, 01:05 PM
  3. Replies: 5
    Last Post: 08-02-2012, 09:44 AM
  4. Working days module help for noob
    By AndycompanyZ in forum Modules
    Replies: 5
    Last Post: 07-27-2011, 01:43 AM
  5. Select query with two criteria
    By corni in forum Queries
    Replies: 1
    Last Post: 01-22-2009, 05:23 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