Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Pikeboy is offline Novice
    Windows 11 Office 365
    Join Date
    Oct 2022
    Posts
    10

    Data in field off-center


    I've a form I created from a query using the wizard. All of my data looks good except two of the columns. In those, the data in the fields is off-center and until I made the text box larger both were somewhat cut off. There is nothing I can find that I have done to cause this. Any ideas what it might be? In both fields the character length is only going to ever be but 3 characters so enlarging the text box really isn't too desirable.

    Attached Thumbnails Attached Thumbnails Screenshot 2023-10-30 195445.png  

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Text left aligns by default. You can change it to center. Textboxes shouldn't have to be that large for only 3 characters.

    Why are numbers centered? The default is right alignment.
    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
    Join Date
    Apr 2017
    Posts
    1,681
    Probably those 2 fields have trailing spaces, i.e. not "CHC" but "CHC ".

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Check the lengths?
    Use Trim() function if you have spaces, or remove them to start with.
    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

  5. #5
    Pikeboy is offline Novice
    Windows 11 Office 365
    Join Date
    Oct 2022
    Posts
    10
    Tried trim (record source - query), confirmed text length at 3, and text align set to center. I'm stumped.






  6. #6
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Upload db with enough to see the issue.
    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

  7. #7
    Pikeboy is offline Novice
    Windows 11 Office 365
    Join Date
    Oct 2022
    Posts
    10
    No matter how much I try to pare it down I get size error message.

  8. #8
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Compact and repair, then zip.
    is it still too big then?
    We only need enough to see the problem, so that form and the data/objects that support it.
    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

  9. #9
    Pikeboy is offline Novice
    Windows 11 Office 365
    Join Date
    Oct 2022
    Posts
    10
    Sample.zip

    Please give this a try. Thanks in advance.

  10. #10
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2019
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Change the Scroll Bars property to None
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  11. #11
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2019
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Change the "Scroll Bars" property of both the textbox controls to None rather than Vertical.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  12. #12
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Quote Originally Posted by Bob Fitz View Post
    Change the "Scroll Bars" property of both the textbox controls to None rather than Vertical.
    Nice spot Bob.
    That property defaults to None when you add a control.
    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

  13. #13
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2019
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Nice spot Bob.
    Thank you for your kind words. More a "Lucky" spot really, I think. I had the form in design view, showing properties. As I moved from the Age control to the Team control the Scroll Bars property changed. Not usually that vigilant
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  14. #14
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Quote Originally Posted by Welshgasman View Post
    Nice spot Bob.
    That property defaults to None when you add a control.
    If you use the wizard to add controls to a new form it varies, and seems to depend on the length of the field and any data already stored in it.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  15. #15
    Pikeboy is offline Novice
    Windows 11 Office 365
    Join Date
    Oct 2022
    Posts
    10
    Worked perfectly, thank you very much!

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Listbox - Center
    By onlylonely in forum Forms
    Replies: 12
    Last Post: 10-28-2023, 09:47 AM
  2. Replies: 9
    Last Post: 10-28-2017, 08:51 AM
  3. Center a form on the screen
    By dniezby in forum Forms
    Replies: 2
    Last Post: 04-13-2017, 06:58 PM
  4. Center text vertically
    By kuku202 in forum Reports
    Replies: 1
    Last Post: 02-07-2015, 05:27 AM
  5. Contact Center DB
    By tduffield89 in forum Database Design
    Replies: 23
    Last Post: 11-19-2013, 03:11 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