A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

#name? error



 
 
Thread Tools Display Modes
  #1  
Old May 13th, 2010, 06:09 PM posted to microsoft.public.access.forms
Steve Stad
external usenet poster
 
Posts: 89
Default #name? error

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")
  #2  
Old May 13th, 2010, 07:15 PM posted to microsoft.public.access.forms
Golfinray
external usenet poster
 
Posts: 1,597
Default #name? error

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")

  #3  
Old May 13th, 2010, 07:44 PM posted to microsoft.public.access.forms
Steve Stad
external usenet poster
 
Posts: 89
Default #name? error

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")

  #4  
Old May 13th, 2010, 07:50 PM posted to microsoft.public.access.forms
Golfinray
external usenet poster
 
Posts: 1,597
Default #name? error

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")

  #5  
Old May 13th, 2010, 08:13 PM posted to microsoft.public.access.forms
Steve Stad
external usenet poster
 
Posts: 89
Default #name? error

Golfinray,

I tried the formula you suggested...
=IIf(Forms![qry_Emp_TotalHrsWorked
subform]!SumOfEmp_Act_Prod_Hrs1920,"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")

  #6  
Old May 13th, 2010, 08:24 PM posted to microsoft.public.access.forms
Golfinray
external usenet poster
 
Posts: 1,597
Default #name? error

Try this:
forms!form name!subform name!subformcontrolname
I think you are going to have to have the complete reference of form,
formname, subform name, control name instead of form, subformname, control
name. The space should not be the issue.
--
Milton Purdy
ACCESS
State of Arkansas


"Steve Stad" wrote:

Golfinray,

I tried the formula you suggested...
=IIf(Forms![qry_Emp_TotalHrsWorked
subform]!SumOfEmp_Act_Prod_Hrs1920,"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")

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:14 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.