Welcome to SPN

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

Sign Up Now!
  1. Guest ji, please consider donating today!
      Become a Supporter    ::   Make a Contribution   
    Monthly Recurring Target: $300 :: Achieved: $95

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
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page