#Name? appears in form field, even though it worked before I saved

  • Thread starter Thread starter Sara M
  • Start date Start date
S

Sara M

I have created a form with a calculated field with the control name
"ItemCost." I can save the form and the field calculates and returns
appropriate values. HOWEVER, when I close the database, restart the database,
and open the form, the "#Name?" appears in the field. At this point, I go
into the design and change the name of the control to "ItemCost1," for
example, and the field caclulates and returns values. I save the form and
everything works fine...until I close the database again. How can I resolve
this issue? Thanks!
 
it doesn't seem to be able to find all the necessary values for the
calculation during the opening but works once opened.... you mention closing
and opening the entire db rather than just the form....double check where
your values originate from....
 
Do you have a field named ItemCost in the table or query that the form is
using as its RecordSource? By chance, is that field used in the expression
that you have as the control's ControlSource? That often is the cause of the
problem. If you're using ItemCost field in a control's ControlSource
expression, the name of that control must be different than the field name.
 
Sara M said:
I have created a form with a calculated field with the control name
"ItemCost." I can save the form and the field calculates and returns
appropriate values. HOWEVER, when I close the database, restart the
database,
and open the form, the "#Name?" appears in the field. At this point, I go
into the design and change the name of the control to "ItemCost1," for
example, and the field caclulates and returns values. I save the form and
everything works fine...until I close the database again. How can I
resolve
this issue? Thanks!
 
No, I don't have a field with the same name in the underlying table or query.
I have checked all of my control name's and it's not a duplicate. I even
tried deleting the control and creating a new one, named [ItemCosts], but I
had the same problem. So, my fix was to add the calculation to the underlying
query, rather than in the form itself. Now, the query calculates properly,
and the form displays the correct data.

Thanks.
 
Back
Top