Results 1 to 3 of 3
  1. #1
    Back2Basics is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Feb 2010
    Posts
    28

    Calculate Due date based on drop down list

    Hi



    I am trying to calculate the due date for a project based on the start date and the project type. I have a table with project type, days, months - for each project type there are associated days and months which I would like to add to the start date to provide the expected due date.

    The field names I have are:
    Project type = [Application Type]
    Start date = [Date Duly Made]

    I also need to add a month if the project needs consultation, which is a tick box on a form.

    For example:

    Date duly made = 01/02/2015; Application Type; Type 1 - this means it will take 3 months and 0 days; No consultation
    The Due date should be = 01/05/2015

    Date duly made = 01/02/2015; Application Type; Type 2 - this means it will take 0 months and 28 days; Consultation Required
    The Due date should be = 28/03/2015

    Any help with this would be really really appreciated

    NB. I haven't built this database, I've just be charged with updating it.
    Last edited by Back2Basics; 04-02-2015 at 06:11 AM. Reason: Solved

  2. #2
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    if your dropdown (we'll call it cboProjectTypes) rowsource is something like

    SELECT ProjectType, NoDays, NoMonths FROM tblProjectTypes

    and you have set no of columns to 3

    and your consultation tick box is called hasConsultation

    then your calculation for due date would be

    dateadd("d",cboProjectTypes.Column(1)+(abs(hasCons ultation)*28),dateadd("m",cboProjectTypes.Column(2 ),[Date Duly Made]))

  3. #3
    Back2Basics is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Feb 2010
    Posts
    28
    Brill

    thanks Ajax

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

Similar Threads

  1. Replies: 1
    Last Post: 08-11-2014, 09:57 AM
  2. Replies: 1
    Last Post: 11-26-2013, 09:25 AM
  3. Replies: 3
    Last Post: 12-30-2011, 01:20 PM
  4. Replies: 34
    Last Post: 12-01-2011, 08:18 AM
  5. Replies: 4
    Last Post: 06-16-2011, 09: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