Results 1 to 2 of 2
  1. #1
    Clernix is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Jun 2017
    Posts
    7

    Having trouble with Calculated Field

    Hello All,



    I am new to Access and teaching myself at home. I am working in the 2016 New Perspectives manual. I am trying to enter this in a calculated field ContactName: IIf( IsNull(NickName) , LastName & ", " & FirstName, Lastname & ", " & Nickname) but when I run the query it changes to ContactName: IIf(IsNull([NickName]),[LastName] & ", " & [FirstName],[Lastname] & ", " & [Nickname]) which makes it a parameter.


    Any help is greatly appreciated.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    IF your fields are single words,(no spaces), using the brackets is the same as NOT using brackets
    but its always best practice to always use brackets.

    you WILL get a parameter if the field is spelled wrong.
    or
    the field does not exist. (which is a kind of misspelling)
    or
    you have an extra actual parameter in the query setting not getting fulfilled. (the parameter button on the toolbar)


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

Similar Threads

  1. Replies: 1
    Last Post: 05-22-2017, 05:59 AM
  2. trouble with code for calculated value
    By robinsong in forum Programming
    Replies: 6
    Last Post: 12-14-2016, 04:07 PM
  3. Trouble with Calculated field.
    By jtm013 in forum Access
    Replies: 12
    Last Post: 02-26-2015, 01:58 PM
  4. Replies: 2
    Last Post: 12-30-2014, 01:32 PM
  5. Replies: 3
    Last Post: 11-24-2012, 07:33 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