Results 1 to 2 of 2
  1. #1
    TheSpecialist is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2015
    Location
    Georgia
    Posts
    47

    Date enter query please help

    I have a database and I want two parameters. I have one already I want to know when I a create this query how can I put a date that show 2 days before and 2 day after the date I entered along with the date I entered.



    For instance, If I put in 5/1/2016 I want my database to show the numbers that came on that date and 2 days before and 2 days after that date I entered

    so far this is my sql statement

    SELECT [All Table Summary].MoonPhaseYourNumber, [All Table Summary].YourDate, [All Table Summary].Cash4YourNumber, [All Table Summary].GAFiveYourNumber, [All Table Summary].YourTableYourNumber
    FROM [All Table Summary]
    WHERE ((([All Table Summary].MoonPhaseYourNumber)=[Enter Moon PhaseNumber]));

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    this will check the 3 dates, not between them

    select * from table where [dateFld]= [Enter Date] or [dateFld]=dateAdd("d",2,[Enter Date]) or [dateFld]=dateAdd("d",-2,[Enter Date])

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

Similar Threads

  1. Replies: 4
    Last Post: 03-11-2014, 06:38 PM
  2. Replies: 8
    Last Post: 10-30-2013, 02:28 PM
  3. Enter current date and time into subform field
    By tonybrecko in forum Forms
    Replies: 8
    Last Post: 06-16-2013, 09:58 PM
  4. Enter Wildcards for Date Parameters
    By P5C768 in forum Queries
    Replies: 3
    Last Post: 05-18-2011, 01:42 PM
  5. Replies: 5
    Last Post: 02-06-2011, 04:32 PM

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