Results 1 to 5 of 5
  1. #1
    westfallbp is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Mar 2021
    Posts
    26

    Query based on one table not returning values for date

    Have a table called Tauction and I have a Date field called auctionDate. I then based a query on that table called QAuction

    In the query I have the AuctionDate field in there just by itself to seed if would return only those records for todays date, (There are records in the table with todays date if your wondering) I put in the criteria for the field in the query Date() it only returns 1 record where It should have returned 6. Am I using the right syntax Date(). I even went to the table and set it to index yes Duplicates yes. Cant figure this out and only assuming it shouldn't be Date(). Help would be appreciated. Thanx Ps. It does however work with a perimeter query when in the criteria [Enter Date]

  2. #2
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,421
    You're saying that you have 6 records in the table that have today's date? If Date() returns only 1 record, then the other five records are different somehow. That field is Date/Time data type when you look at the field properties in table design view? And you're entering dates only and not time as well?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    Try wrapping the AuctionDate field in DateValue() to strip the time component and use Date() in the criteria row.
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,550
    I would go with a Time element as well.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    westfallbp is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Mar 2021
    Posts
    26
    Quote Originally Posted by Micron View Post
    You're saying that you have 6 records in the table that have today's date? If Date() returns only 1 record, then the other five records are different somehow. That field is Date/Time data type when you look at the field properties in table design view? And you're entering dates only and not time as well?

    I resolved the issue, I looked in the table and the field was set to Date extended

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

Similar Threads

  1. Returning Multiple values from one combo box
    By Daisy509th in forum Programming
    Replies: 2
    Last Post: 04-11-2018, 06:26 AM
  2. Replies: 1
    Last Post: 08-21-2017, 03:07 PM
  3. Replies: 3
    Last Post: 03-17-2017, 02:14 AM
  4. Replies: 2
    Last Post: 02-11-2015, 08:16 AM
  5. Query not returning null values
    By janelgirl in forum Access
    Replies: 5
    Last Post: 10-11-2011, 10:31 AM

Tags for this Thread

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