Results 1 to 8 of 8
  1. #1
    Star Lounger
    Join Date
    May 2004
    Posts
    81
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Query (Access 2000)

    Hello,
    I have a query that is based on a single table and in this table there is a date field. Now in the query, I would like to filter the data for the current day only. To elaborate, anything that someone enters for today from morning to evening I would like to view it. And on the following day I would like to view just the records added for that day. Can anybody help me with this please. I am sure it is a simple solution. I appreciate any help I recieve,

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

    Re: Query (Access 2000)

    Enter the following in the Criteria: row under the date field:
    <code>
    Date()
    </code>
    That's it!

  3. #3
    Star Lounger
    Join Date
    May 2004
    Posts
    81
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query (Access 2000)

    Mr. Hans,
    Your always helping me out and I appreciate it greatly. The criteria Date() in the date field doen't seem to return any of the records from the table. Now when I type a < in front on the Date() criteria I get all the records. There are records in the table for today's date. Let me explain the situation a little. I have a form and this form is set to data entry. Now the user of the aforementioned form wants to be able to run a query to check to see that the information was entered correctly. Again any help will be very much appreciated. Oh by the way Mr. Hans, I thank you for the suggestions on my table design from my last post.

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

    Re: Query (Access 2000)

    What is the content of the date field? Just the date (04/21/2005) or the date+time (04/21/2005 16:46 PM)?

  5. #5
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query (Access 2000)

    If the data type of the field is date and it contains date + time, you should use >Date() as criteria. And not <.
    Francois

  6. #6
    Star Lounger
    Join Date
    May 2004
    Posts
    81
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query (Access 2000)

    Hans,
    The field is in a date/time format.

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

    Re: Query (Access 2000)

    Yes, we understand that. Does Francois' suggestion work?

  8. #8
    Star Lounger
    Join Date
    May 2004
    Posts
    81
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query (Access 2000)

    Francois,
    Your suggestion worked like clockwork. Thank you very much for the assistance. You to Hans your help is always appreciated.

Posting Permissions

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