`Efficiency` problem - please help

  • Thread starter Thread starter thardis
  • Start date Start date
T

thardis

Guest
I have following problem:
I am trying to create a form where I have following elements:

1.) A text box named: "Time Claimed"
2.) A text box named: "Time Spend"
3.) A tick box named: "Was ZM time used?"
4.) A disabled text box named: "Efficeincy"

The Efficiency is a simple calculation where [Time Claimed] / [Time Spend] and it is a percentage % value. I want "Efficiency" box to be highlighted in red if it`s value is: (and that is where my problem starts)

1.) if the tick box is ticked the Efficiency cannot be greater than 100%
2.) if the tick box is not ticked the Efficiency cannot be greater than 130%

I know that I can set up conditional formatting for "Efficiency" text box but I don`t know how to combine it with the tick box.

Basically, in real world I have a technician who worked on the car (for instance) for 1.2 hrs [time claimed] and his clockcard shows me that he actually spend 1.5 hrs [time spend] his efficiency in this case would be 80%. I don`t wont it to be greater than 100% if he used "ZM time" [was ZM time used?] and greater than 130% if not.

If some one could help I would be really greatfull because I waste last few days trying to set this up.
Thank you all in aticipation...

Martin P.
 
...

If chktickbox = true then

else

end if

Simple as this...

msgbox"if user tries to calc something not suppose to explain proper instructions..."

chktickbox .setfocus "make them do it over again....

Something of this nature... just use ...

if statements & msg boxes and setfocus to guide them...
 
Maybe use the 'Option Button' Control in the form design will help you sort it out.

Option button control only allows you to select one option. So the value of two option buttons can be set to 0 and 1.

Use the condition to check which option has been selected before the calculation.
 

Users who are viewing this thread

Back
Top Bottom