Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change the format of text box programmatically

How To

Change the format of text box programmatically

by  randysmid  Posted    (Edited  )
Access 2000 -
Did you know that you can intentionally change the format of a text box on the report, as it is printing?

Here is an example:

If txtNumber > 1000 Then
Me![txtNumber].Format = "Currency"
End If

If you wish to have decimals only appear when the number actually includes them, set the Decimal format to Auto.

The other types of formats include:
Standard e.g., 1,234.56
Fixed e.g., 1234.56
Percent e.g., 100%
Currency e.g., $1,234.56

Of course, there are more formats than this available.

Feedback, comments?
Randy Smith, MCP
rsmith@cta.org [pc2]

Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top