Storing Decimal Values versus Displaying Decimals .. 
Author Message
 Storing Decimal Values versus Displaying Decimals ..

Dear Newsgroup,

I have a textbox that I want to limit to 3 places past the decimal,
1.234 for instance, and subsequently store this data in this same format
.. How do I do this ??   The .decimal property only affects the display
NOT how the data is actually stored in the tables ..

Thanks,
Brooks



Sat, 03 Nov 2001 03:00:00 GMT  
 Storing Decimal Values versus Displaying Decimals ..
Brooks, you are correct but I can't figure out why it's so important that
you store 3 decimal places if
it displays correctly?  Is there a rounding problem or something?  Anyway,
you could run a set value
on your text box or an update query on your table using the following
function:

Val(Left(Format([Number],"000000.000000"),10))

   -**** Posted from RemarQ, http://www.remarq.com/?a ****-
 Search and Read Usenet Discussions in your Browser - FREE -



Sun, 04 Nov 2001 03:00:00 GMT  
 Storing Decimal Values versus Displaying Decimals ..
Microsoft intends the Input Mask to provide the functionality you
require.

IMHO, Input Masks are really klutzy. I'd far prefer to use the
AfterUpdate event of the text box to round the value to 3 places,
e.g.:
If Not IsNull(Me!MyTextBox) Then
  Me!MyTextBox = Round(Me!MyTextBox, 3)
End if

Access does not have such as Round function, but Ken Getz posted one
in the group last year. E-mail me if you can't locate it.

Quote:

> I have a textbox that I want to limit to 3 places past the decimal,
> 1.234 for instance, and subsequently store this data in this same format
> .. How do I do this ??   The .decimal property only affects the display
> NOT how the data is actually stored in the tables ..



Mon, 05 Nov 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How can I change some values from decimal point to decimal comma

2. Storing and Calculating numeric values with only 2 digit after the decimal point

3. stored decimal values

4. Storing and Calculating numeric values with only 2 digit after the decimal point

5. Currency versus Decimal

6. Squares versus decimal point

7. taking a number in Excle with decimal points to a number without decimals with leading zeros

8. decimal comma - decimal point?

9. change decimal comma change in decimal point

10. excel'97 web query and decimal point/decimal comma problem


 
Powered by phpBB® Forum Software © phpBB Group