Results 1 to 6 of 6
  1. #1
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919

    Trailing dots "." in a left aligned label control


    Is there a builtin control property for trailing dots "." in a left aligned label control? Or, some simple way of doing this?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Have you ever used the String() function?

  3. #3
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    Sure, lots of times. How does that apply here? Given the creation of a label like:

    Click image for larger version. 

Name:	003.jpg 
Views:	12 
Size:	9.0 KB 
ID:	32286

    Wanting to have it display as:

    Click image for larger version. 

Name:	002.jpg 
Views:	12 
Size:	61.1 KB 
ID:	32287

    As you can see, I just ran out some dots with each control format. I just wondered if there was a native function in Access that I'd not come across in the past that would offer trailing characters.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Label controls cannot have an expression. Will just have to type periods.

    A textbox can have an expression: =[fieldname] & String(50,".")
    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
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    Yes, I've used that very approach with text boxes, which is more-or-less what gave rise to my post in the first place.
    Thanks,
    Bill

  6. #6
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Quote Originally Posted by June7 View Post
    Label controls cannot have an expression. Will just have to type periods.

    A textbox can have an expression: =[fieldname] & String(50,".")
    Not quite true. You could assign a constant like this:

    Code:
    Option Compare Database
    Option Explicit
    
    Const strDots = ". . ."
    
    Private Sub Form_Load()
        Me.Label1.Caption = "Test label " & strDots
    End Sub
    Click image for larger version. 

Name:	Capture.PNG 
Views:	11 
Size:	5.8 KB 
ID:	32290

    That way you only have to type the ellipsis once (in a module declaration) & you can use it anywhere
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

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

Similar Threads

  1. Replies: 12
    Last Post: 12-21-2016, 04:27 AM
  2. Replies: 1
    Last Post: 09-07-2015, 08:00 AM
  3. Replies: 2
    Last Post: 01-18-2014, 08:42 PM
  4. Undefined Function "Left" in Expression
    By krueck in forum Access
    Replies: 4
    Last Post: 09-30-2011, 10:50 AM
  5. Relocating objects via "Left" properties value
    By Ripcut in forum Programming
    Replies: 0
    Last Post: 08-01-2008, 06:40 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