Results 1 to 10 of 10
  1. #1
    Huddle is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jun 2010
    Posts
    318

    Calculated field #Name? error


    I have several calculated fields in two unrelated forms that now read #Name?. When I saved that database a couple of days ago they worked. In the backup database they work. I even compared the backup database formulas with the original database and the formulas are exactly the same.

    The only difference between the database is I added some fields to a form and made some reports.
    I didn't change any field names.
    I did a "compact & repair".

    Any idea what could be causing this?
    Last edited by Huddle; 02-16-2012 at 10:32 AM.

  2. #2
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Quote Originally Posted by Huddle View Post
    I have several calculated fields in two unrelated forms that now read #Name?. When I saved that database a couple of days ago they worked. In the backup database they work. I even compared the backup database formulas with the original database and the formulas are exactly the same.

    The only difference between the database is I added some fields to a form and made some reports.
    I didn't change any field names.
    I did a "compact & repair".

    Any idea what could be causing this?
    Some where you have to have changed the name of a control or field.
    "#Name" is an error that means that Access can't find a referenced field/control name.
    Look at the calculated control and locate each part of the formula. You should find (or shouldn't find) one or more of the field/control names.

  3. #3
    Huddle is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jun 2010
    Posts
    318
    OK, I have gremlins...I opened it to do as you suggested and now it is working. I didn't change a thing. That scares me.

  4. #4
    Huddle is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jun 2010
    Posts
    318
    Take that back. I closed it and opened it again to double check it and now it's giving the errors again.

    Three of the five calculations are unrelated. So it can't be just one field/control name.

    Example:
    GSA Contact is a combo box name GSA_Contact_Cmb whose Row Source is directed to a table.
    The first calculated box is =[GSA_Contact_Cmb].[column](1) & " x" & [GSA_Contact_Cmb].[column](2)
    The second calculated box is =[GSA_Contact_Cmb].[column](3)

    On another Tab I have Last_Signature_Date which is manually entered.
    The first calculated field is =IIf(IsNull([Last_Signature_Date])," ",DLookUp("[FSA_FY]","[Lookup_Tbl_Fiscal_Year]","[Start_Date] <= #" & [Last_Signature_Date] & "# And [End_Date] >= #" & [Last_Signature_Date] & "#"))

    The second calculated box is =IIf([Status]="Closed","Inactive",IIf([FSL]<>0,IIf([FSL]=4,[Last_Signature_Date]+1096,IIf([FSL]=3,[Last_Signature_Date]+1096,IIf([FSL]=2,[Last_Signature_Date]+1827,IIf([FSL]=1,[Last_Signature_Date]+1827)))),"Need FSL"))

    And the last calculated box is =IIf([Next_FSA]="Inactive"," ",IIf([Next_FSA]="Need FSL"," ",IIf(IsNull([Next_FSA])," ",DLookUp("[FSA_FY]","[Lookup_Tbl_Fiscal_Year]","[Start_Date] <= #" & [Next_FSA] & "# And [End_Date] >= #" & [Next_FSA] & "#"))))

    The only commonality is they are on Tabs.

    There is also a Macro for a pop up form that will not run with the Command Button but when I click outside the Tabs it pops up.

  5. #5
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Quote Originally Posted by Huddle View Post
    Take that back. I closed it and opened it again to double check it and now it's giving the errors again.

    Three of the five calculations are unrelated. So it can't be just one field/control name.

    Example:
    GSA Contact is a combo box name GSA_Contact_Cmb whose Row Source is directed to a table.
    The first calculated box is =[GSA_Contact_Cmb].[column](1) & " x" & [GSA_Contact_Cmb].[column](2)
    The second calculated box is =[GSA_Contact_Cmb].[column](3)

    On another Tab I have Last_Signature_Date which is manually entered.
    The first calculated field is =IIf(IsNull([Last_Signature_Date])," ",DLookUp("[FSA_FY]","[Lookup_Tbl_Fiscal_Year]","[Start_Date] <= #" & [Last_Signature_Date] & "# And [End_Date] >= #" & [Last_Signature_Date] & "#"))

    The second calculated box is =IIf([Status]="Closed","Inactive",IIf([FSL]<>0,IIf([FSL]=4,[Last_Signature_Date]+1096,IIf([FSL]=3,[Last_Signature_Date]+1096,IIf([FSL]=2,[Last_Signature_Date]+1827,IIf([FSL]=1,[Last_Signature_Date]+1827)))),"Need FSL"))

    And the last calculated box is =IIf([Next_FSA]="Inactive"," ",IIf([Next_FSA]="Need FSL"," ",IIf(IsNull([Next_FSA])," ",DLookUp("[FSA_FY]","[Lookup_Tbl_Fiscal_Year]","[Start_Date] <= #" & [Next_FSA] & "# And [End_Date] >= #" & [Next_FSA] & "#"))))

    The only commonality is they are on Tabs.

    There is also a Macro for a pop up form that will not run with the Command Button but when I click outside the Tabs it pops up.
    Have you done a "Compact and Repair"?

  6. #6
    Huddle is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jun 2010
    Posts
    318
    Yes. What I probably will end up doing is taking the backup and redo all the work since then. I just wish I knew what caused it to prevent it from happening again.

  7. #7
    Huddle is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jun 2010
    Posts
    318
    Re-did the DB. It's easier the second time around. I think it had something to do with the Macro. First time I made a Macro to open the pop up form. Second time I used the wizard when creating the command button. Not sure logically why that would make a difference but it seems to work OK. We'll hold our breath.

  8. #8
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Quote Originally Posted by Huddle View Post
    Re-did the DB. It's easier the second time around. I think it had something to do with the Macro. First time I made a Macro to open the pop up form. Second time I used the wizard when creating the command button. Not sure logically why that would make a difference but it seems to work OK. We'll hold our breath.
    I never use macros, so I wouldn't have any idea. Glad you got it working....

  9. #9
    ork2002 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2014
    Posts
    11
    This is happening to me too; except when I physically run the form query, I no longer get the #Name errors.

  10. #10
    ork2002 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2014
    Posts
    11
    So if I just copy the form in the navigation pane and paste it and rename it, then this problem goes away. It seems that when I put a subreport into my form it added some bit of code that did not get deleted when I removed the subreport. When you copy and paste the form, it removes this background code that seems to interfere with the form query and all is fixed.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Calculated field help
    By eds in forum Access
    Replies: 2
    Last Post: 07-18-2011, 05:33 PM
  2. Calculated Field (if/then) Help
    By agent- in forum Programming
    Replies: 10
    Last Post: 03-30-2011, 05:43 PM
  3. calculated field
    By nashr1928 in forum Forms
    Replies: 2
    Last Post: 03-30-2011, 04:29 PM
  4. Replies: 5
    Last Post: 09-17-2010, 09:48 PM
  5. Calculated field
    By nashr1928 in forum Forms
    Replies: 3
    Last Post: 07-22-2010, 05:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums