From: Steve Stad on 13 May 2010 13:09 Whats wrong with this expression in text box on main form reading value of field [SumOfEmp_Act_Prod_Hrs] in subform named 'qry_Emp_TotalHrsWorked subform' - it is getting #name? error =IIf([Forms]![qry_Emp_TotalHrsWorked subform]![SumOfEmp_Act_Prod_Hrs]>1920,"EMP HOURS ARE GREATER THAN 1920","Emp Product Hours Less Than 1920")
From: golfinray on 13 May 2010 14:15 Are hours in units of time or text? If text your 1920's must be "1920" -- Milton Purdy ACCESS State of Arkansas "Steve Stad" wrote: > Whats wrong with this expression in text box on main form reading value of > field [SumOfEmp_Act_Prod_Hrs] in subform named 'qry_Emp_TotalHrsWorked > subform' - it is getting #name? error > > =IIf([Forms]![qry_Emp_TotalHrsWorked > subform]![SumOfEmp_Act_Prod_Hrs]>1920,"EMP HOURS ARE GREATER THAN 1920","Emp > Product Hours Less Than 1920")
From: Steve Stad on 13 May 2010 14:44 Golfinray - the format is/was blank in the sub form qry_Emp_TotalHrsWorked subform for 'SumOfEmp_Act_Prod_Hrs'. After reading your reply I tried changing the format in the subform to general number and standard number. I also tried the "1920" - still getting the #name? error. "golfinray" wrote: > Are hours in units of time or text? If text your 1920's must be "1920" > -- > Milton Purdy > ACCESS > State of Arkansas > > > "Steve Stad" wrote: > > > Whats wrong with this expression in text box on main form reading value of > > field [SumOfEmp_Act_Prod_Hrs] in subform named 'qry_Emp_TotalHrsWorked > > subform' - it is getting #name? error > > > > =IIf([Forms]![qry_Emp_TotalHrsWorked > > subform]![SumOfEmp_Act_Prod_Hrs]>1920,"EMP HOURS ARE GREATER THAN 1920","Emp > > Product Hours Less Than 1920")
From: golfinray on 13 May 2010 14:50 To see if the problem is in your field name of the subform try this: =IIf([Forms]![qry_Emp_TotalHrsWorked > > > subform]![SumOfEmp_Act_Prod_Hrs]>1920,"yes","no") That should tell you if it is finding the field name. -- Milton Purdy ACCESS State of Arkansas "Steve Stad" wrote: > Golfinray - the format is/was blank in the sub form qry_Emp_TotalHrsWorked > subform for 'SumOfEmp_Act_Prod_Hrs'. After reading your reply I tried > changing the format in the subform to general number and standard number. I > also tried the "1920" - still getting the #name? error. > > "golfinray" wrote: > > > Are hours in units of time or text? If text your 1920's must be "1920" > > -- > > Milton Purdy > > ACCESS > > State of Arkansas > > > > > > "Steve Stad" wrote: > > > > > Whats wrong with this expression in text box on main form reading value of > > > field [SumOfEmp_Act_Prod_Hrs] in subform named 'qry_Emp_TotalHrsWorked > > > subform' - it is getting #name? error > > > > > > =IIf([Forms]![qry_Emp_TotalHrsWorked > > > subform]![SumOfEmp_Act_Prod_Hrs]>1920,"EMP HOURS ARE GREATER THAN 1920","Emp > > > Product Hours Less Than 1920")
From: Steve Stad on 13 May 2010 15:13
Golfinray, I tried the formula you suggested... =IIf(Forms![qry_Emp_TotalHrsWorked subform]!SumOfEmp_Act_Prod_Hrs>1920,"Yes","No") got the same #name? error. could the issue be the space in the subform name - Access created the name with the space...qry_Emp_TotalHrsWorked subform. "golfinray" wrote: > To see if the problem is in your field name of the subform try this: > =IIf([Forms]![qry_Emp_TotalHrsWorked > > > > subform]![SumOfEmp_Act_Prod_Hrs]>1920,"yes","no") > That should tell you if it is finding the field name. > -- > Milton Purdy > ACCESS > State of Arkansas > > > "Steve Stad" wrote: > > > Golfinray - the format is/was blank in the sub form qry_Emp_TotalHrsWorked > > subform for 'SumOfEmp_Act_Prod_Hrs'. After reading your reply I tried > > changing the format in the subform to general number and standard number. I > > also tried the "1920" - still getting the #name? error. > > > > "golfinray" wrote: > > > > > Are hours in units of time or text? If text your 1920's must be "1920" > > > -- > > > Milton Purdy > > > ACCESS > > > State of Arkansas > > > > > > > > > "Steve Stad" wrote: > > > > > > > Whats wrong with this expression in text box on main form reading value of > > > > field [SumOfEmp_Act_Prod_Hrs] in subform named 'qry_Emp_TotalHrsWorked > > > > subform' - it is getting #name? error > > > > > > > > =IIf([Forms]![qry_Emp_TotalHrsWorked > > > > subform]![SumOfEmp_Act_Prod_Hrs]>1920,"EMP HOURS ARE GREATER THAN 1920","Emp > > > > Product Hours Less Than 1920") |