Page 1 of 2 12 LastLast
Results 1 to 15 of 26
  1. #1
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664

    #NAME? Error

    I am getting a #NAME? in some of my fields in the Ceil in tutorial. I think that I have found the reason here:



    http://access.mvps.org/access/forms/frm0018.htm


    The errors show up in the form view and is as I said.

    #NAME?

    How do get rid of it?

    The Ceil Inn tutorial can be found here:

    http://www.functionx.com/access/appl...ns/ceilinn.htm


    Again how do I get rid of the error?

    Any help appreciated. Thanks in advance.


    Respectfully,


    Lou_Reed

  2. #2
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    #name means you have a value in a controlsource that access does not recognise - so check your spelling

  3. #3
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    This was copied directly from the Ceil Inn tutorial. If mine is wrong what does it say about theirs?

    Is name just an error marker or is it the specific variable that MS Access 2010 does not recognize.

    In other words is #NAME? undefined?


    Respectfully,

    Lou_Reed
    Last edited by Lou_Reed; 05-14-2015 at 09:41 AM. Reason: error

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    It's an error marker - undefined - Access does not recognize the reference so it substitutes.

    We already confirmed that tutorial is not perfect.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    In a calculated control, #NAME? can arise if the control contains an expression that causes a circular reference or if the control name cannot be resolved (as Ajax mentioned) or if the underlying record source for the form does not contain a field of the same name as what's in the expression. I have also read where issues arose in databases that were built in older versions and the user upgrades the Access version. I doubt the latter is your problem. Suggest you post the expression and the name of the control. The sql for the underlying record source might be a good thing to see as well.

  6. #6
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    Can it tell me what part of the expression it is having problem with? I only copied it from the Ceil Inn Tutorial. I would like it to be a little more specific!

    Also, how does one get the SQL code?

    Thanks in advance.


    Respectfully,

    Lou_Reed

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    No, it will not indicate exactly what part of the expression is wrong. Post the info Micron suggested so we can analyse.

    Switch query to SQL View.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    What is the NAME property of the control and what is the CONTROL SOURCE property of the control?

  9. #9
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664

    Zip Ceil Inn tutorial program

    Okay here is a zipped version of my working Ceil Inn tutorial file. Check Occupancies and NewOccupamcies forms for the #NAME errors. they should be in the

    Room type
    Bed Type
    Regular Rate

    text boxes. Something is not working and thus in these three boxes, I get #NAME? instead of a blank entry space on the form.


    Any help appreciated.


    Respectfully,


    Lou_Reed
    Attached Files Attached Files

  10. #10
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Note that the textboxes for PaymentDate and AmountCharged and TaxRate have green triangles in upper left corner. This is an error indicator. The error is 'No such field in the field list'. These fields are not in the form's RecordSource. Since the DLookup refers to AmountCharged, the expression fails.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #11
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    Okay, but my concern now is with the #NAME error. I will get to that one after this error is cleared up.


    Respectfully,


    Lou_Reed

  12. #12
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    They are all the same issue. The field is not in the form's RecordSource so any reference to it will error.

    Why does textbox with a ControlSource of AmountCharged have a label of Room Number?

    Why does textbox with a ControlSource of PaymentDate have a label of Date Occupied?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  13. #13
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    You have a mess of problems with this form :P

    The formula itself is bombing out because you're trying to perform a lookup based on a text value but supplying a numeric value. Your field is bound to a numeric value (amountcharged) when it should be a text field (roomnumber)

    If you change the control source of the field with the label ROOM NUMBER to actually be ROOMNUMBER and change your formula to reflect the correct field it should work. Or you can try using lookup queries for data entry.

    Your tables have primary keys so you can use this type of query just make sure to lock/disable any data entry fields from the lookup table (customers, employees, rooms)
    CeilInn11.zip

  14. #14
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    Yes, I correct the Room Number error and the tax rate error. I still have the three errors mentioned above, but I think that I can take care of that.

    I assume this requires a query build in order to bring in info from a second table. Is this correct?

    Thanks in advance.

    R,


    Lou_Reed

  15. #15
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    I am not clear whether you are now using a lookup query (the database I modified and added as an attachment) or whether you are still using dlookups.

    If you are using dlookups you have to use the correct fields to perform the lookup in the correct context (number, date or text values) or you'll continue to get the error messages

    If you're using the lookup query as long as you are connecting the tables through the PK (primary key) of the sub table (employees, customers, rooms, etc) then it should perform the lookup automatically, you just have to make sure to lock the fields that you do not want your users to change.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 11
    Last Post: 05-01-2014, 11:56 AM
  2. Replies: 3
    Last Post: 01-23-2014, 07:49 AM
  3. Replies: 0
    Last Post: 07-16-2012, 05:42 AM
  4. Replies: 6
    Last Post: 05-30-2012, 12:32 PM
  5. Replies: 1
    Last Post: 05-11-2012, 10:59 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