954,582 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Truncating Text for Display in Access

I am working on updating a database where some measurements are stored as text. The updates I'm making are to let the engineers that use it convert their measurements into different units. Long story short, the numbers must be kept as text for a couple reasons that I won't go into. Now I have no issues doing the conversions or anything like that, my issue comes with displaying the data.

For example, say the measurement was an angle of 180 degrees. Now when converted to radians you get a value of Pi radians of course. My issue occurs when I want to display this as a decimal. Access automatically does it as 3.14159265358979. Is there anyway to only display 3.142 without altering the text stored in the database? This text box is a bound control and needs to stay that way.

Thanks.

leverin4
Junior Poster in Training
79 posts since Apr 2008
Reputation Points: 10
Solved Threads: 4
 

You might be able to use the "display" property??? "Format" Property??? of the field in question (i.e. table design view or the property of the textbox itself...). Can't quite remember as I don't normally work in VBA...

Good Luck

vb5prgrmr
Posting Virtuoso
1,912 posts since Mar 2009
Reputation Points: 156
Solved Threads: 296
 

See DataFormat of the TextBox in Property Window, maybe there is something useful there..

Goodluck..

jhai_salvador
Junior Poster
180 posts since Mar 2008
Reputation Points: 33
Solved Threads: 34
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: