Results 1 to 3 of 3
  1. #1
    d9pierce1 is offline Expert
    Windows 10 Access 2016
    Join Date
    Jan 2012
    Location
    Oklahoma
    Posts
    828

    Trim Funnction question

    Hi all,


    Is there a way to remove the " & " if the sFirstName is null in a trim function?

    ProperName: Trim([FirstName] & " & " & [sFirstName] & " " & [LastName])
    Thank you
    Dave
    Last edited by d9pierce1; 10-23-2021 at 10:49 AM. Reason: mispelled

  2. #2
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    This is vba code or query? Could use IIF function to not add & if [firstname] is null.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    d9pierce1 is offline Expert
    Windows 10 Access 2016
    Join Date
    Jan 2012
    Location
    Oklahoma
    Posts
    828
    IIF will work, thanks
    Dave

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

Similar Threads

  1. Trim!
    By redbull in forum Programming
    Replies: 9
    Last Post: 11-06-2012, 06:01 AM
  2. Trim vba
    By shexe in forum Access
    Replies: 5
    Last Post: 11-16-2011, 10:20 AM
  3. Trim value
    By dada in forum Programming
    Replies: 5
    Last Post: 09-02-2010, 11:01 PM
  4. Trim Function
    By ZMac in forum Reports
    Replies: 9
    Last Post: 08-30-2010, 07:36 AM
  5. Trim
    By JMantei in forum Forms
    Replies: 1
    Last Post: 06-20-2006, 02:06 PM

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