Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

TickBox & calculation help please!

Discussion in 'Information Technology' started by gjoneshtfc@volcanomail.com, Oct 29, 2005.

  1. gjoneshtfc@volcanomail.com

    gjoneshtfc@volcanomail.com
    Expand Collapse
    Guest

    Hello

    I have a form set up where there is a: number of weeks field, cost per
    week field, exam tick box, exam cost field and total cost field. What i
    need is for the total cost field to calculate as follows:

    if(ExamTick = yes) => Total cost = (Number of weeks * Cost per week) +
    Exam Cost

    if(ExamTick = no) => Total cost = Number of weeks * Cost per week

    Can anyone advise me on how to program the Control Source data entry
    for the total cost field to achieve this?? Or if it is possible at
    all?! If it is not possible has anyone got any suggestions?

    Thanks and kind regards,
    Gareth Jones
     
  2. Al Camp

    Al Camp
    Expand Collapse
    Guest

    Set the ControlSource of a calculated text control to...

    = IIF(ExamTick = Yes, (NumberOfWeeks * CostPerWeek) +1, (NumberOfWeeks *
    CostPerWeek))
    -
    hth
    Al Camp
    Candia Computer Consulting - Candia NH
    http://home.comcast.net/~cccsolutions

    <gjoneshtfc@volcanomail.com> wrote in message
    news:1130505584.146765.25290@g47g2000cwa.googlegroups.com...
    > Hello
    >
    > I have a form set up where there is a: number of weeks field, cost per
    > week field, exam tick box, exam cost field and total cost field. What i
    > need is for the total cost field to calculate as follows:
    >
    > if(ExamTick = yes) => Total cost = (Number of weeks * Cost per week) +
    > Exam Cost
    >
    > if(ExamTick = no) => Total cost = Number of weeks * Cost per week
    >
    > Can anyone advise me on how to program the Control Source data entry
    > for the total cost field to achieve this?? Or if it is possible at
    > all?! If it is not possible has anyone got any suggestions?
    >
    > Thanks and kind regards,
    > Gareth Jones
    >
     
  3. gjoneshtfc@volcanomail.com

    gjoneshtfc@volcanomail.com
    Expand Collapse
    Guest

    Thanks Al!

    Worked a treat - cheers!

    Regards, Gareth
     

Share This Page