Results 1 to 6 of 6
  1. #1
    wipidu is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    3

    Database that calculate Due Dates

    I would like to create an Access Database that calculate due date based on 2 tables, one with invoices and supplier details. The other one with Supplier name et payment terms.

    Input:
    Table with the following details:
    - Supplier Name
    - Invoice Date
    - Currency
    - Amount



    Output:
    Table same as input but with a column that shows for each record the Due Date. The due date would be calculated by adding payment terms in days from another table to the Invoice date.

    How should I do that?
    Thank you in advance for your help

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Provide details on the other table. Is there a relationship between the tables, such as Supplier Name in both?
    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
    wipidu is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    3
    Yes,
    the other table will have only Supplier Name and Payment Terms:

    Company A ; 60 days
    Company B ; 30 days

    The supplier name will appear several times in the first table with different invoices date for each line of entry.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Build a query that joins the tables. Then the Payment Terms field will be available.

    However, the Payment Terms field shows as text. It really should be a number field with just the days value.

    Then can calculate the due date with simple addition: [Invoice Date] + [Payment Terms]
    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.

  5. #5
    wipidu is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    3
    Click image for larger version. 

Name:	Picture1.png 
Views:	9 
Size:	146.9 KB 
ID:	17379Click image for larger version. 

Name:	Picture2.png 
Views:	9 
Size:	88.7 KB 
ID:	17380

    Unfortunately, this doesnt work, i don't have any data.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    The ID field in Payment Terms is defined as primary key but you are linking on the Brand fields. Linking should be done with primary key field. So if you are saving the Brand value in Data table, Brand should be the primary key in Payment Terms.

    Did you build Lookups in the Data table? I NEVER build Lookups in tables. http://access.mvps.org/access/lookupfields.htm

    So what value is really being saved into Brand in Data 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.

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

Similar Threads

  1. Replies: 12
    Last Post: 04-16-2014, 07:26 AM
  2. Calculate Minutes Between Two Dates and Times
    By robrich22 in forum Programming
    Replies: 3
    Last Post: 01-31-2014, 07:56 PM
  3. Calculate days between two dates by VBA
    By hhuuhn12 in forum Programming
    Replies: 16
    Last Post: 12-10-2013, 03:11 PM
  4. Calculate time between two working dates
    By Alprashant in forum Access
    Replies: 15
    Last Post: 10-10-2013, 03:19 PM
  5. Calculate duration between two dates
    By Tommy1005 in forum Queries
    Replies: 3
    Last Post: 07-02-2012, 05:41 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