Results 1 to 3 of 3
  1. #1
    webisti is offline The Wisher
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    115

    show records from Friday when working on monday

    Hi guys

    I am stuck with a query results:

    a table is being updated every day. Table name is "Process".
    basically on this table I am appending all the orders inserted from clients since Friday, and on other days just insert the orders from the day before:
    On the Orderdate field of the pending query
    I do have this criteria:
    Code:
    Between IIf(Weekday(Date())=2,(Max(ORDER_DATE]))>=Date()-3,Date()-1) And Date()-1
    but is not working. instead of just appending the last Friday`s data on Monday it is inserting everything..
    How should I modify it in order to have just the last Friday.


    Any ideas on this issue.

    thanks a lot

    Webisti

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    There are orders on Sat and Sun to be captured as well?

    I don't understand the use of Max(). Max() is an SQL aggregate function. I am surprised anything is inserted with this.

    Try:

    BETWEEN Date() - IIf(Weekday(Date())=2, 3, 1) AND Date()-1

    Why do you have to do this? If records are already in db, why aren't they already in the appropriate table?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    webisti is offline The Wisher
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    115
    Actually This table is base for a split form that should show Date()-1 orders.
    There are also orders with a future date but I want them not to sh0w therefore the criteria is date().
    but if that should happen in Monday they it must show also what has been received also during the weekend.
    I will try your version.. thanks June

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

Similar Threads

  1. Calculate last 4 weeks (Friday to Friday)
    By Astron2012 in forum Queries
    Replies: 2
    Last Post: 11-29-2013, 04:08 PM
  2. Replies: 17
    Last Post: 07-31-2013, 11:35 AM
  3. Replies: 9
    Last Post: 04-26-2013, 12:12 PM
  4. Select the First friday after a date
    By lucasjkr in forum Queries
    Replies: 1
    Last Post: 11-13-2012, 03:07 PM
  5. Getting the last and the next Friday
    By bonecone in forum Programming
    Replies: 9
    Last Post: 05-10-2012, 02:02 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