Results 1 to 4 of 4
  1. #1
    taimysho0 is offline Competent Performer
    Windows XP Access 2000
    Join Date
    Nov 2011
    Posts
    286

    CRITERIA only looks at the LAST 20 BUSINESS DAYS


    hello, i have a query that subtracts two columns. One column is the Date with most recent data, the second column is the date when the data was requested. I want to subtract the date of the request from the date of the most recent data, and if this number is more than 4 BUSINESS DAYS, then to show up in the query.

    i can get the query to calculate this, but it includes saturday and sunday in the calculation. please help. thanks

  2. #2
    Bruce is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Nov 2009
    Posts
    72
    Can you provide the SQL?

  3. #3
    hertfordkc is offline 18 year novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    481

    See this link.

    http://access.mvps.org/access/datetime/date0006.htm

    I haven't tried it, so you are on your own.

  4. #4
    taimysho0 is offline Competent Performer
    Windows XP Access 2000
    Join Date
    Nov 2011
    Posts
    286
    Quote Originally Posted by Bruce View Post
    Can you provide the SQL?

    here is the SQL code from the SQL View in the Design View of the Query. Is there a way to do it from Design View instead of programming it with vbl? thanks:


    DELETE tblHHFRequest_tais.[Channel ID], tblHHFRequest_tais.[Due Date], tblHHFRequest_tais.[HHF Status], tblHHFRequest_tais.Serial, tblHHFRequest_tais.[Account Type], tblHHFRequest_tais.[Date Requested], tblHHFRequest_tais.Address, tblHHFRequest_tais.City, tblHHFRequest_tais.[LAN ID], tblHHFRequest_tais.Notes, tblHHFRequest_tais.[Field Order #], tblHHFRequest_tais.Supervisor, tblHHFRequest_tais.[Crew Lead]
    FROM tblHHFRequest_tais
    WHERE (((tblHHFRequest_tais.Serial) Is Null) AND ((tblHHFRequest_tais.[Account Type]) Is Null) AND ((tblHHFRequest_tais.[Date Requested])=Date()) AND ((tblHHFRequest_tais.Address) Is Null) AND ((tblHHFRequest_tais.City) Is Null) AND ((tblHHFRequest_tais.[LAN ID]) Is Null) AND ((tblHHFRequest_tais.[Field Order #]) Is Null) AND ((tblHHFRequest_tais.Supervisor) Is Null) AND ((tblHHFRequest_tais.[Crew Lead]) Is Null));

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

Similar Threads

  1. First week or business day of the month
    By Dutch1956 in forum Programming
    Replies: 12
    Last Post: 09-18-2011, 08:39 AM
  2. Select Dates between days and two days ago?
    By rstonehouse in forum Queries
    Replies: 4
    Last Post: 08-18-2010, 02:13 AM
  3. Replies: 2
    Last Post: 04-27-2010, 01:25 PM
  4. Loading data for our business
    By fsmikwen in forum Programming
    Replies: 2
    Last Post: 04-16-2010, 09:13 AM
  5. Small Business Question
    By P5C768 in forum Access
    Replies: 1
    Last Post: 09-28-2009, 08:27 AM

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