Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2006
    Posts
    4

    Unanswered: Querry returns blank with date range

    I have a Db I designed for Vitual Airline I fly with. It is designed to calculate pilot pay, total hours, total pilot pay etc. I have a querry (qryPilotTotals) that I want to work with Between [Enter Beginning Date] And [Enter Ending Date]
    in the criteria field so it can be querry by date range. Unfornatley when I put that in the field it returns the querry blank. There is data for for the date ranges I put in, so it should return something. When I remove the statement for the criteria. it will give the complete running total. Any Idea why a date range wouldnt return data.


    Also this is my first Db, so if I needed I will post the Db, if someone is willing to look at it. and not laugh at me

    Thanks for any help

    Pat K

  2. #2
    Join Date
    Jan 2007
    Location
    California, USA
    Posts
    520
    How is your date field defined in your table? That will help to know. Also, what is your normal date format? mm/dd/yyyy, dd/mm/yyyy, or ????

  3. #3
    Join Date
    Dec 2006
    Posts
    4

    Querry returns blank with date range

    I think this what you want

    Table-tblPilotReport
    Feild Name-Date
    Data Type-Date/Time
    Format-Short Date
    Input Mask-99/99/0000;0;_
    Required-Yes
    Indexed-Yes (Duplicates OK)
    IME Mode-Off
    IME Sentence Mode-None

    Im am using mm/dd/yyyy normal date format

    The table has 4 primary keys. Date, PilotId, Aircraft, and Flight number. Maybe this is the problem?? This was done since someone may make multiple flights in a day. This is the only table with a date field.

    The querry that does not work with Between [Enter Beginning Date] And [Enter Ending Date] actuly get it data from another querry called
    qrptTicketSales. qrptTiketSales get it data from a tblPilotReport with the date field and also another querry. Is that ok, as i understood it this could be done with no problem, but most of my design came from reading forums so it may be all messed up. I have attached the Db if you want to look.

    Thanks for the help

    Pk
    Attached Files Attached Files

  4. #4
    Join Date
    Jan 2007
    Location
    California, USA
    Posts
    520
    Pat,

    I looked at the query "qryPilotTotals" in your database but did not see the Between ... And ... that you had mentioned in your first post. So I added the date field, then put the Between ... into the criteria field, ran the query, and it selected some records. So, I'm sending the zipped database back to you to try the "qryPilotTotals" query. Please let us know how it works.
    Attached Files Attached Files

  5. #5
    Join Date
    Dec 2006
    Posts
    4
    Thanks Vics, I removed the Between And... while trying to worl on the Db. And forgot to put it back in before ziping the file. What you put in works perfectly. To be honest I didnt have the Date feild in the querry at all, but now that I see it there, it makes sense. duhhhhhh. Thanks for your help. Also thanks to all who post on this forum I built the Db getting many many answers here. Actually all my answers. I short I could not have done it with out your help.

Posting Permissions

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