Results 1 to 3 of 3
  1. #1
    dniezby is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Apr 2013
    Posts
    183

    How to use & sign in Labels and Captions?

    I'm trying to use the & symbol in a Caption or a Label and when I publish the form, it gives me a _



    I want to use it for buttons and other labels for thing like, "Save & Close" but can't find anything about using it.

    Thanks in advance.

  2. #2
    dniezby is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Apr 2013
    Posts
    183
    There are two ways. One is simply to double up on the character:

    Johnson && Johnson

    will work. The other is to use the Chr() function.

    "Johnson " & Chr(123) & " Johnson"

    where 123 is the ASCII value of the ampersand.

  3. #3
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    if the caption is coming from somewhere else, such as a caption property for a form, you can try

    me.mylabel.caption="'" & somevalue & "'"

    or try

    me.mylabel.caption=replace(somevalue,"&","&&")

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

Similar Threads

  1. Captions on Forms
    By swenger in forum Forms
    Replies: 4
    Last Post: 06-08-2016, 09:15 AM
  2. Accessing datasheet captions
    By newbieX in forum Programming
    Replies: 6
    Last Post: 10-06-2014, 04:28 PM
  3. Sign Out and Sign In Student Database
    By jamiers in forum Forms
    Replies: 6
    Last Post: 08-29-2012, 02:03 PM
  4. Dynamic Form, Dynamic labels/ captions?
    By JFo in forum Programming
    Replies: 15
    Last Post: 10-12-2011, 08:33 PM
  5. Replies: 35
    Last Post: 09-19-2011, 10:13 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