Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    No Query Results (Access 2000 >)

    Hi all,

    Based on some advice from Hans in <post#=430322>post 430322</post#>

    I designed a query to extract a course code from a table using a parameter, eg [Type first course code here]. I saved and ran it and it gave good results.

    Then I designed another query to extract another course code from the same table using a parameter, eg [Type second course code here]. I saved and ran it and it gave good results.

    Then I designed a third query using the above two queries as the source. I added a parameter to extract all data from a certain date!, eg >=[Type start date of course to view]. When I run this query it propmts for all 3 parameters, 1st course, 2nd course and start date. The result is 0 records.

    I discovered that when I removed the parameters from the two source queries, and simply put the course code into the criteria cell the third query runs well, supplying the data for the two courses after a given date!

    Why does this not work when I have the parameters in the source queries? Why do I get 0 records?
    Regards,
    Rudi

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

    Re: No Query Results (Access 2000 >)

    I think we would have to see (a stripped down copy of) the database to be able to help.

  3. #3
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: No Query Results (Access 2000 >)

    I agree with Hans - guessing what might be wrong is usually fruitless.

    On another tack, why do you need two or three queries - the two queries you are using are essentially an OR condition. But how are you combining the two queries? There must be some sort of join in your query, and that is probably why you aren't getting any records. To return records in that situation you need to create a Union query, but you don't need to as a simple OR criteria will do the trick.
    Wendell

Posting Permissions

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