Results 1 to 11 of 11
  1. #1
    agnelogat is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    7

    Smile Running a query with default date values in the table

    Hi All,



    New here to access forums and excited to start my forum journey

    My question: I have a table with a date field called "Date returned" and this field has a default date value of date()+14.

    I then created a query from which i want to be able to filter through all the "Date returned" records which have todays date in it.

    I tried doing the standard =date() expression bt that just brings up the values in the table which are date()+14 so im really stuck here :S

    I would be EVER grateful to any one who can help me out here

  2. #2
    agnelogat is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    7
    P.s this is a school project so would really appreciate anny help i get (Y)

  3. #3
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    It sounds to me like you got what you wanted. What am I missing here?

  4. #4
    agnelogat is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    7
    Hi! Thanks for replying,

    Well, I would like the query to ONLY display "date returned" values which are today's date, however, due to the default value settings in the table it just brings up the value of todays date plus 14 days. So im not able to get the query to ONLY display today's date, u see what im getting at?

    Sorry if that was all a bit confusing..

  5. #5
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I'm still not following. It does not *just* bring up records with the field set to today? What date value is in the records with that default date of Date() + 14?

  6. #6
    agnelogat is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    7
    Right,

    table has the field: "Date Returned" Which on the properties has a default value of date() + 14 so all the new records have the date value of Date()+14.

    I then created a query and tried to search for all records which have ONLY todays date and this should normally be a =date(). But this expression brings up the records which has the date values of the default date values in the table properties: Date()+14.

    So for example, I have two records with date returned value of 14/11/11 and 31/10/11 and i have in the query criteira =date() , it will only enter the 14/11/11 (which is todays date +14 days) value instead of todays actual date which is 31/10/11.

    What I would like the query to do is to just pull todays date instead of 14 days later.

    Thanks again for your help

  7. #7
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Are there *other* dates being returned as well? Are you struggling with International Dates? http://allenbrowne.com/ser-36.html

  8. #8
    agnelogat is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    7
    no other dates are being returned with =date() other than those records which have todays date +14. so if there was another date value of 14/11/10 then that would be returned aswell.

    Ummm, I dont think it has anything to do with international dates because when i remove the default values in the table properties and then run the query for date() , the query return all today dates instead of today+14

  9. #9
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Any chance you can post your db for review? You can create a newn db and *import* just what you need to demonstrate the problem and then zip it up for posting.

  10. #10
    agnelogat is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    7
    Thanks for all your help! I managed to figure out what the problem was and rectified it!

  11. #11
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Care to share your solution with others that read this forum?

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

Similar Threads

  1. Replies: 7
    Last Post: 02-06-2012, 11:54 AM
  2. Default Min & Max Date Values in Form
    By alsoto in forum Forms
    Replies: 3
    Last Post: 10-03-2011, 10:54 AM
  3. Running a query or table in a form
    By Katherine in forum Forms
    Replies: 1
    Last Post: 08-17-2011, 09:12 AM
  4. Query default to Pivot Table view
    By Theremin_Ohio in forum Access
    Replies: 1
    Last Post: 03-30-2011, 09:17 AM
  5. Replies: 2
    Last Post: 02-07-2011, 01:11 PM

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