CSng
Using the CSng Function
In this tutorial you will learn how to use the CSng Function.
The CSng function returns a Single.
=CSng( expression )
expression the value you wish to convert to a Single
When you don't need the precision of a Long.
FORM
In a Form you could set the Default Value of a Textbox to
=CSng(12.123456789) '12.12346
VBA
In a Form add a TEXTBOX control and rename it "txtCSng", then you could add the following in the Load Event.
Private Sub Form_Load()
txtCSng = CSng(12.123456789) '12.12346
End Sub
Course
Access Expert 26
Seminars
Access Web Sync
Search
You can find more about this by searching the website.
By: Alex Hedley
Click here to sign up for more FREE tips
|