Reducing white space (padding) of Text Box field control (1 Viewer)

mdlueck

Sr. Application Developer
Local time
Today, 18:52
Joined
Jun 23, 2011
Messages
2,648
Greetings,

Access 2007 is not obeying my request to reduce right-side padding for a right text aligned control. I have gone as far as setting this one field control's Right Margin / Right Padding properties both to 0, the text align is set to right. Yet Access insists on leaving some white space at the right side of the field control, and the data is large enough it is spilling off the left edge of the field control.

So, in Access, what should the Right Margin / Right Padding properties control?

Is there another property I have not thought to adjust to be able to reduce field white space?
 
The format may be affecting it. For numeric values there is always the possiblity of a negative value and so numeric formats leave room for a trailing - or right paren.
 
May be some spaces, have you tried trim()?
 
May be some spaces?

No trailing space characters.

I selected across the field and only the number characters change background color (get selected) and there is a gap after the select color before the edge of the field control. Thus the space I would like to reduce.
 
Here is a shot in the dark, try a negative value..
 
Further, if I over fill the control way beyond its width, and select all of the characters, then it will scroll over to show me the left edge of the string.

The left edge of the value will flush with the left edge of the control, and the gap at the right side remains... and scrolled over to the left then the right end of the value is cut off.

I have attempted to attach a sample.

All Margin / Padding values are back to the A2007 defaults. I only ever adjusted the Right values.
 

Attachments

  • TextFieldRightPaddingIssueExample1.png
    TextFieldRightPaddingIssueExample1.png
    2.7 KB · Views: 788
Every control has a default format based on the data type of the field it is bound to. I was trying to say that you can control the format by specifying your own. Numeric formats are three parts - positive values, negative values, null values. You can specify a negative value that uses just color rather than color + a symbol.
 
is the white line to the right of your number the edge of the text box? Have you tinkered with the controls border width?

Edit: and is it set to a 3d border type?
 
Every control has a default format based on the data type of the field it is bound to.

All right, I follow you there. These fields are bound to Currency columns in the Access FE DB.

In the sample screen capture the ".00" is shown... So I would not think space still farther right needs to be reserved, no?

I was trying to say that you can control the format by specifying your own. Numeric formats are three parts - positive values, negative values, null values. You can specify a negative value that uses just color rather than color + a symbol.

Would this need to reserve space at the right side of the number?
 
is the white line to the right of your number the edge of the text box?

Yes that white line is the right border of the field control in the Multiple Items grid view.

Have you tinkered with the controls border width?

No, just applied the Access 2003 theme and I run with that.

Edit: and is it set to a 3d border type?

I see no 3D border property of the field control.

I see a "Special Effect" which is set to Sunken.
 
There you go, change that...

Edit: just looked at you png again and that might not help much...
 
I think it may have something to do with the grid view thing which I am not familar with...
 
Solved! I set the Format property to Standard, and the mysterious padding WENT AWAY. As a bonus, the $ character did as well which was an undesired side affect of the Access FE DB's currency data type.

So, displaying as desired at last...

Thank you! :D
 

Attachments

  • TextFieldRightPaddingIssueExample2.png
    TextFieldRightPaddingIssueExample2.png
    1.6 KB · Views: 542
That's because the default currency format uses parens for negative numbers and so reserves the rightmost position for the ")".
 
You did point that out in post 2 didn't you :)

Is there anything you don't know about Access Pat. :)
 
Yes. You can tell that by the questions I don't answer:)
 
I was of the impression that by leaving Format set to Blank/Empty, Access would not evoke any formatting rules. With unbound controls that is the case.

Unfortunately with bound controls, leaving Format Blank/Empty results in the table column type causing Access to do some formatting, and thus the problem. CoNfUsInG!
 
This has gotten me in the past. If the controls have no borders, you can tweak the alignment so that the gap at the right isn't visible. There is nothing you can do if the controls have borders though.
 

Users who are viewing this thread

Back
Top Bottom