if statement connected to a text box

  • Thread starter Thread starter viren
  • Start date Start date
V

viren

hi
i have a textbox1 that calculates labour hrs as checkboxes are ticked in the
form. what i need is another textbox that tells me whether it is a light
,medium or heavy repair based on the hrs calculated by textbox 1..
let say
1-500hrs = light repair
501-1000 =medium repair
1000 = heavy repair

please help!
 
Hi Viren,

Assuming your labour hours textbox is called "txtLabourHrs", then set the
new textbox's ControlSource as follows:
=IIf(Nz([txtLabourHrs],0)=0,"",IIf([txtLabourHrs]<=500,"Light",IIf([txtLabourHrs]<=1000,"Medium","Heavy")))

That's it! :-)

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
Cheers Graham. its exactly what i needed.

Graham R Seach MVP said:
Hi Viren,

Assuming your labour hours textbox is called "txtLabourHrs", then set the
new textbox's ControlSource as follows:
=IIf(Nz([txtLabourHrs],0)=0,"",IIf([txtLabourHrs]<=500,"Light",IIf([txtLabourHrs]<=1000,"Medium","Heavy")))

That's it! :-)

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

viren said:
hi
i have a textbox1 that calculates labour hrs as checkboxes are ticked in
the
form. what i need is another textbox that tells me whether it is a light
,medium or heavy repair based on the hrs calculated by textbox 1..
let say
1-500hrs = light repair
501-1000 =medium repair

please help!
 
Back
Top