Results 1 to 3 of 3
  1. #1
    expresso_dl is offline Novice
    Windows Vista Access 2007
    Join Date
    Nov 2013
    Posts
    2

    Received Date V.S Completion Date

    Access Newbie



    I have been struggling to come up with a MS ACCESS final template to count the number of requests received and completed with Query. What I am trying to achieve with Access that to display a series of numbers under each field.

    Received date = date()-1
    Completion date =date()-1

    e.g if received date is 20th Nov, which could be completed in a future date of T+1, T+2, T+3....where a completion date is 20th Nov, the requests might have been received on T-1, T-2, T-3. Therefore, in order to show the counts of both ‘Received date’ and Completion date’ while their dates cannot co-exist, can anyone please share a brilliant solution to over come? In order to show an entire picture of what I was assigned to do, I am also providing the entire list needs to go in to the same Access.

    Recived Date date()-1
    Completion Date date()-1
    Over Due due date (given field) < date()
    Due Today due date (given field) = date()
    Due Later due date (given field) > date()

    The reason I am running this on Access instead of Excel is because I am processing for over 20 countries and the raw data can be fed through to Access with daily and timely update.

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    If you have a bound textbox named ReceivedDate and an unbound textbox named txtDue then you could use the following in your form's current event.


    Code:
    Dim dtReceived As Date
    Dim dtNow As Date
    Dim intDiff As Integer
    dtReceived = Me.ReceivedDate.Value
    dtNow = Date
    intDiff = DateDiff("d", dtNow, dtReceived)
    MsgBox intDiff
    Select Case intDiff
    Case Is < 0
    Me.txtDue.Value = "Past Due " & intDiff & " Days"
    Me.txtDue.ForeColor = 255
    Case 0
    Me.txtDue.Value = "Due Now!"
    Me.txtDue.ForeColor = 255
    Case 1 To 20
    Me.txtDue.Value = "Due Later " & intDiff & " Days"
    Me.txtDue.ForeColor = 0
    Case Is > 20
    Me.txtDue.Value = "Due Much Later " & intDiff & " Days"
    Me.txtDue.ForeColor = 0
    End Select

  3. #3
    expresso_dl is offline Novice
    Windows Vista Access 2007
    Join Date
    Nov 2013
    Posts
    2
    this is brilliant. thank you

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

Similar Threads

  1. Replies: 2
    Last Post: 07-09-2013, 06:31 PM
  2. Replies: 2
    Last Post: 09-29-2012, 11:22 PM
  3. Replies: 3
    Last Post: 08-21-2012, 03:05 PM
  4. Replies: 15
    Last Post: 04-06-2012, 10:57 AM
  5. Query for Received and Closed Date Range
    By swalsh84 in forum Queries
    Replies: 2
    Last Post: 10-11-2011, 09:06 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