Formatting Issue

  • Thread starter Thread starter BamaBlacksmith
  • Start date Start date
B

BamaBlacksmith

I need to be able to set the displayed format (number of characters)
differently for a field in each record on a continuous form. The formatted
number of characters is based on the value in another field within the same
record.

I.e. the field "Nominal Value" is setup as a text field. "Resolution" is an
integer. I need to be able to enter any number of characters both +/- and
decimals yet DISPLAY only the number of characters past the decimal as
indicated by the "Resolution Field". All of this needs to happen in a
continuous form. Ive seen this done in Delphi but can it be done in Access?
Thx..
 
If you set the ControlSource of the "NominalValue" TextBox to:
=Left(CStr(FieldWithValue), nz(Resolution,0) + InStr(1,
CStr(FieldWithValue), "."))
I think it will give you the result desired.

This gives you an unbound textbox that displays FieldWithValue with the
number of decimal places specified by the field Resolution.

Ron W
 
Back
Top