How to stop form field resizing on different computers

adhoustonj

Member
Local time
Today, 13:05
Joined
Sep 23, 2022
Messages
195
Hello,
I'm trying to find how to set a width to a field on a form. On some computers the field shrinks so much that "#####" is all that displays instead of the value. Is there a way to set a fixed width that won't resize, or a way to autosize so that all characters are visible?


Thanks
 

Attachments

  • Field2.png
    Field2.png
    2.7 KB · Views: 108
  • Field1.png
    Field1.png
    2.3 KB · Views: 115
Hi. Welcome to AWF!

Looks like you're using a continuous form, not a datasheet, is that correct? I don't remember running into this issue before. When you say different computers, are we talking about different screen resolutions? If so, the normal approach is to design the form in the smallest screen resolution to make sure it fits in all the other displays as well. Not sure if that helps with your situation though.
 
Hello, Thanks for the welcome!

I am using a continuous form. Yes some monitors are set up at different resolutions than others. I tried resizing the fields to fix the issue, as the form only takes up 1/2 of the screen width, but the field still resized to display "######". I'll do some more digging. Just wanted to make sure I wasn't missing something obvious. Thanks!
 
This problem is actually quite common. TheDBguy called it correctly in that it frequently depends on screen resolution. This is because Access takes seriously the dimensions you provide for your text boxes and other data-bearing controls. If you create a box and allocate a width of 0.500 inches, the Access rendering facility (not directly visible to us) will try to draw the width at exactly 0.500 inches on your screen, based on dynamically checking the screen resolution. But the FONT SIZE you choose also has to render according to the size of the pixels available on the screen, and frequently that size doesn't come out even. The screen rendering software has to round fractional pixels and I believe there are cases where it rounds UP. Because individual character rendering works with smaller objects, that need for rounding will occur more often. When that happens, you get the "#####" text in the text box.

However, there is also the possibility that your field is variable in data width. In your second example, some of the items in that column show up OK but others do not. Further, digit sizes you showed included 6, 0, and 8, all of which are wide characters. Is there a chance of a 5th or higher digit in some of those numbers you showed us? If so, your sizing should have been based on the largest numbers expected to be displayed.

If you try to print something, again the issue of resolution pops up. Worse, if you have multiple printers (say, in an office network), each one CAN have different resolution and thus can behave differently for this same issue of compressing the text enough to trigger that "#####" display. Therefore, when sizing, consider testing print as well as visual outputs.
 
Access has a setting called 'Check for truncated number fields.' When true, if a control is even slightly too small, Access obscures the entirety of the data. To change this setting, go to Access Options -> Current Database -> Application Options -> Check for truncated number fields, and clear the check box.

This does not answer your question about resizing the control, but it might make the data visible enough.

Note that it makes sense to obscure the data if the number is 100.00, and all you can see is 0.00.
 

Users who are viewing this thread

Back
Top Bottom