1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

Query help needed in MS Access

Discussion in 'Other PC Software' started by Joe Locke, 2004/04/18.

Thread Status:
Not open for further replies.
  1. 2004/04/18
    Joe Locke

    Joe Locke Inactive Thread Starter

    Joined:
    2002/01/30
    Messages:
    170
    Likes Received:
    0
    I hope I'm not breaking the rules since MS Access kinda is OS specific...

    I need to query records in a database that are unpaid and are late in terms of NET30.
    (Those who may not know: If an invoice is created 1/18/2004 they have until 2/18/2004 to pay. It's considered late on 2/19/2004.)
    If I do a query and this 1/18/2004 invoice is unpaid I want it to be displayed.

    EVEYTHING I've tried will only show invoices that are 30 days older than the current date.

    PLEASE, PLEASE I need help!
    (I've tried Yahoo searches and have come up empty!)

    If specific code can't be given, maybe just a logical bump on my head will help. Although I'm only familar with DATE() and doing a query with the BETWEEN command and < > <= >= etc.
     
  2. 2004/04/19
    merlin

    merlin Inactive

    Joined:
    2003/01/07
    Messages:
    1,111
    Likes Received:
    0
    Hi Joe, Maybe this will point you in the right direction.
    It is the body of one of my queries in my "Accounts"
    MS Access Database :

    FROM `C:\My Documents\Accounts`.Accounts Accounts WHERE (Accounts.DD>0) AND (Accounts.YYYY=Year(Now())) AND (Accounts.Diver>0) AND (Accounts.MM=Month(Now())) ORDER BY Accounts.DD

    This gives me details of bookings in the Database under the heading Diver aka "Diverse ".
    You will please note that the Year(Now()) is the full 4 digit
    year number that you want queried.
    You can add additional ANDs to define your requirements.
    regards
     

  3. to hide this advert.

  4. 2004/04/19
    Joe Locke

    Joe Locke Inactive Thread Starter

    Joined:
    2002/01/30
    Messages:
    170
    Likes Received:
    0
    It hit me like a rock...

    So I was at work today and I think it came to me!
    I felt like pouding myself silly...

    All I had to do was:
    For Net30 - WHERE InvoiceDate+30 <= date()
    This adds 30 days to the invoice date...if the result is less than or equal to today's date...it's late!

    DUH!
     
  5. 2004/04/20
    merlin

    merlin Inactive

    Joined:
    2003/01/07
    Messages:
    1,111
    Likes Received:
    0
    Hi Joe - pleased you solved it ! :)
    I must say the creators of Excel, Query etc have done a
    brilliant job over the years.
    WHERE/AND is one of the most useful scripts ever thought out
    and programmed.
    regards
     
Thread Status:
Not open for further replies.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.