Results 1 to 8 of 8
  1. #1
    cbende2's Avatar
    cbende2 is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jun 2014
    Location
    Louisiana
    Posts
    370

    Question Adding ellipses to a text field

    Hello all,

    I have, what I think is a simple problem. Basically I have a text box on a form that needs to be a certain size. The actual text that is populating the text box is too many characters to be displayed. How do I make the text box display the first 3 characters and then an ellipses following?

    Also I thought about making a new unbound textbox with ellipses, however, my form is continuous, so even though the some text boxes have empty strings, the ellipses will still be present.

    Some pseudocode of what I'm guessing it will look like:



    [(If(String(Me![NotesField] > 3 characters) then Return(Left(String(Me![NotesField], 3)" & "..."))]

    Any help will be greatly appreciated!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Why do you have a field that allows long strings but then only display 3 characters?

    Expression in query or textbox:

    IIf(Len([NotesField])>3, Left([NotesField],3) & "...")
    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.

  3. #3
    cbende2's Avatar
    cbende2 is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jun 2014
    Location
    Louisiana
    Posts
    370
    Its a continuous form, and my Boss wants the notefield on there so they can tell whether or not that record has notes. I'm just following directions from the Ol' Bossaroo. Thanks June7, I'll comment in a bit and let you know if it works!

  4. #4
    cbende2's Avatar
    cbende2 is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jun 2014
    Location
    Louisiana
    Posts
    370
    Okay, So I am getting a #Type! Error, By the way, I think I need to mention that the text box is bound to the [NoteField].

    What I did was paste the formula you gave me into the expression builder

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    If you have expression in the ControlSource of textbox then it is not bound to field. However, if the textbox is named the same as the field used in expression, will cause a circular reference error. Name the textbox like tbxNotes.

    Expression in textbox must be preceded with = sign.

    The form RecordSource is a query? You might do the calc in query instead.
    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.

  6. #6
    cbende2's Avatar
    cbende2 is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jun 2014
    Location
    Louisiana
    Posts
    370
    Where would it go in the query? in the criteria? or would I set it as an Alias: IIf(Len([NotesField])>3, Left([NotesField],3) & "...")

    EDIT: I used an unbound textbox and its working now. Thank you June7!

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    In query the expression would create a field - an 'alias' as you put it. Bind textbox to that field. It would not be an editable field of course.

    Either way, set the textbox as TabStop No. I also make non-editable controls look different from data entry controls.
    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
    cbende2's Avatar
    cbende2 is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jun 2014
    Location
    Louisiana
    Posts
    370
    Ok thanks!

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

Similar Threads

  1. Replies: 7
    Last Post: 10-17-2012, 11:59 AM
  2. Replies: 6
    Last Post: 07-03-2012, 12:27 PM
  3. Replies: 12
    Last Post: 06-04-2012, 10:55 AM
  4. Replies: 2
    Last Post: 03-30-2012, 07:39 AM
  5. Replies: 2
    Last Post: 05-05-2010, 02:52 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