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

    combo text align

    There's several posts on the subject, but I've not found one that solved my issue. Maybe I ought to mention that with this latest hip surgery that I'm totally sleep deprived and not seeing things for what they are. Anyway, I can't figure out why my combo won't align to the center.
    Click image for larger version. 

Name:	001.jpg 
Views:	17 
Size:	39.2 KB 
ID:	52896 Click image for larger version. 

Name:	002.jpg 
Views:	17 
Size:	5.9 KB 
ID:	52897


    Code:
    Public Function ChoseDay()
    Me.LBLcHOOSE.Visible = True
    Me.cmboChoose.Visible = True
    Me.cmboChoose.SetFocus
    Me.cmboChoose.Dropdown
    
    
    End Function
    I even added a code statement Me.cmboChoose.textalign = 2 after the SetFocus, but no cigar!
    Attached Thumbnails Attached Thumbnails 003.jpg  

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    I do not see that in your pics?
    Why not just do it in design?, why in code?

    FWIW Me.sfcsfrmDaily!cboMealTypeFK.TextAlign = 2 works fine for me.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    2,097
    It's set in the design mode Properties for the combo. I just added the code statement during the course of forcing the issue.

    I fear something else is drastically wrong, even the AfterUpdate event isn't working with a debug statement Msgbox cboChoose.column(1), Nothing displays!!! I did a copy/paste of the controls for the label and the combo and the AfterUpdate works successfully, though the combo box still adjusts to the Right.

    I'm going to assume I somehow have a corrupted host form. I will create an entirely new form and see if the problems follow.

    YEP! The host form of the combo was apparently corrupt, as a re-build yields a functional combo box yet again without the text centered alignment.
    Last edited by GraeagleBill; 03-30-2025 at 04:54 PM.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    I set TextAlign property to Center and both list and text are centered but first line in list is offset 1 space.

    Might want to review https://www.access-programmers.co.uk...olumns.213460/
    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
    2,097

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

Similar Threads

  1. Replies: 4
    Last Post: 02-07-2022, 06:43 PM
  2. Replies: 1
    Last Post: 06-21-2019, 06:17 AM
  3. Using DoCmd Alight Right to align text in a textbox
    By Access_Novice in forum Programming
    Replies: 1
    Last Post: 12-29-2013, 02:55 PM
  4. Align text in a field column.
    By israellawndale in forum Access
    Replies: 1
    Last Post: 08-16-2011, 06:18 PM
  5. How to vertically align text inside a text box ?
    By alexcalgary in forum Forms
    Replies: 2
    Last Post: 10-06-2010, 08:44 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