Results 1 to 10 of 10
  1. #1
    Mehvan's Avatar
    Mehvan is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2016
    Posts
    133

    Post transfer money from by Customers

    Hello Everyone



    I have a question about transfer money from by Customers

    I have a table for transferring money ( InvoiceID , Customer_name , Date , amount and Note )

    I would like to make query for transferring money , When 1 Customer don't transfer money more than 10 days , it tells me , this customer didn't transfer money 10 days or more .
    and also I don't want His name appear less than 10 days , but when He transfers many times , His name don't repeat only last transfer + 10 days .

    Click image for larger version. 

Name:	Capture.PNG 
Views:	21 
Size:	10.2 KB 
ID:	27094

    I used this Query , but When pass more than 10 days His name don't appear , I want to appear His name is more than 10 days .

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    You cant add numbers to dates like integers, you must use DATEADD function

    DateAdd("d",10,[date_in])

  3. #3
    Mehvan's Avatar
    Mehvan is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2016
    Posts
    133
    but I want to know how many days He didn't sent any amount , I would like to appear the number of days , not date/time
    I would like to tell me , This customer didn't sent to you amount 15 days ago less or more .

  4. #4
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I would use
    Code:
    Days: DateDiff("d",Date_in, Date)
    Now() is date and time, Date() is the date only

    In the query, under the criteria for the Days column, you might try entering:
    >10



    Would need to see raw data (records) and the expected results to give a better solution.

  5. #5
    Mehvan's Avatar
    Mehvan is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2016
    Posts
    133
    I already created it , but I don't want to repeat name of customers , and I want to use last date of sent money
    use last date + 10 then tells me , this customer didn't sent money more than 10 days , it isn't care 10 days or more , only I want to tell me this customer didn't send money 10 days or more .

    Click image for larger version. 

Name:	Capture.PNG 
Views:	13 
Size:	10.8 KB 
ID:	27145

    If we look at this above picture , we will see every customers sent money 2 times with difference date
    but when I use : datediif ("d",[date_in],now()) , it's using the first date , it's appears in the below picture

    Click image for larger version. 

Name:	Capture1.PNG 
Views:	13 
Size:	8.9 KB 
ID:	27146
    I would like to use the last date and the first date isn't appear .

    I used bu this way :
    Click image for larger version. 

Name:	Capture2.PNG 
Views:	12 
Size:	15.7 KB 
ID:	27147
    but when I want to open this Query , it's opening by this way

    Click image for larger version. 

Name:	Capture3.PNG 
Views:	13 
Size:	11.1 KB 
ID:	27148

    When I enter on OK button then it will open without a problem
    Click image for larger version. 

Name:	Capture4.PNG 
Views:	13 
Size:	8.6 KB 
ID:	27149

  6. #6
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    Try this. Create a grouped query of maxed dates.



    Then another linking maxed dates to the original table



    Produces your expected output.


    Sent from my iPhone using Tapatalk

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Quote Originally Posted by ranman256 View Post
    You cant add numbers to dates like integers, you must use DATEADD function

    DateAdd("d",10,[date_in])
    Using DateAdd() gives more clarity, but you can do it:

    ?#1/22/17# + 2
    1/24/2017
    ?now() + 1.5
    1/22/2017 10:30:11 PM
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    Mehvan's Avatar
    Mehvan is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2016
    Posts
    133
    thank you very much

    I changed field of DateDiif from Group by to Expression .

  9. #9
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    You get the error for "MaxOFDate_In" because the query doesn't recognize that field name. Try using "date_in" - that field should have the max date because of the Max() function in the Total row.

  10. #10
    Mehvan's Avatar
    Mehvan is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2016
    Posts
    133
    field of ( date_in ) had a max in criteria , I used max for Date_in , and should I use that field I used max for it , because if I don't use that field I used max for it , it will gives me an error result

    I used that way , but It gave me an error result , It didn't give me last date .

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

Similar Threads

  1. Replies: 1
    Last Post: 09-09-2014, 11:29 PM
  2. Help a newbie keep track of lunch money
    By ericturnerpd in forum Access
    Replies: 15
    Last Post: 02-25-2014, 01:27 AM
  3. Replies: 5
    Last Post: 03-05-2013, 03:30 PM
  4. Access to track money?
    By plasteredric in forum Access
    Replies: 2
    Last Post: 01-20-2013, 07:11 PM
  5. Calculating Old English Money
    By gbjc105 in forum Queries
    Replies: 4
    Last Post: 01-23-2010, 06:30 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