Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2011

    Unanswered: Date Calculation

    I have 2 fields I want to add together to produce a third field with answer.
    First field contains a Date, Second fields contains a drop down list with the choice of (P1, P2, P3. P4. If I choose P1, I need to add 1 day on to the date field but must be shown on a separate field. If I choose P2 2days, P3 7 days,
    P4 28 days, any suggestions.

  2. #2
    Join Date
    May 2010
    I would add a second column to the combo box that has the number of days.

    The you can use something like this:

    =[txtdateControlName] + Val([cboMyComboBox].Coumn(1))

    =DateAdd("d", Val([cboMyComboBox].Coumn(1)), [txtdateControlName])

    Not The colun index for a combo box is zero based. This mean the first column has an index of 0. The second column is has an index of 1.
    Boyd Trimmell aka HiTechCoach (free access stuff)
    Microsoft MVP - Access Expert
    BPM/Accounting Systems/Inventory Control/CRM
    Programming: Nine different ways to do it right, a thousand ways to do it wrong.
    Binary--it's as easy as 1-10-11

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts