Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    May 2003
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Query Doesn't Return All Results (Access )

    When I run my query by date it won't display all the results that it is supposed to. Can anyone help? I tried all the suggestions from the help index and nothing worked.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Query Doesn't Return All Results (Access )

    Can you provide some details? For example, switch your query to SQL view (View | SQL), copy the text you see there and paste it into a reply. Or describe the tables and fields used in the query. Or make a screenshot of the query in design view.

  3. #3
    New Lounger
    Join Date
    May 2003
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query Doesn't Return All Results (Access )

    SELECT DISTINCTROW tblEPA.AccountName, tblEPA.AccountNumber, tblEPA.RMLName, tblEPA.RMFName, tblEPA.AMLName, tblEPA.AMFName, tblEPA.ExpirationDate, tblData.ServiceCode, tblServiceCodes.ProductDescription, tblServiceCodes.StandardPrice
    FROM tblServiceCodes INNER JOIN (tblEPA INNER JOIN tblData ON tblEPA.EPAID = tblData.EPAID) ON tblServiceCodes.ServiceCode = tblData.ServiceCode
    WHERE (((tblEPA.ExpirationDate)=[Enter Expiratin Date ]));

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Query Doesn't Return All Results (Access )

    Is it possible that you are "missing" records because there are records with empty values in one or more of the fields on which the tables are joined? In that case, you may have to use outer joins instead of inner joins (double click the line between the tables in the query design window to change the join type)

    One other thing you can try is to declare the parameter explicitly. Open the query in design view, and select Query | Parameters...
    In the first column, enter the parameter exactly as it is in the criteria line - in your case, it would be [Enter Expiratin Date ] - and in the second column, select Date/Time from the dropdown list. then click OK.

    If that doesn't help, post back and tell us whether the query doesn't return all expected records in all cases, or just for specific dates you enter in the parameter box.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •