In this tutorial you will learn how to use the Val Function.
The Val function returns the numbers contained in a string as a numeric value of appropriate type.
=Val( string )
string any valid string expression
The Val function recognizes only the period (.) as a valid decimal separator. When different decimal separators are used, as in international applications, use CDbl instead to convert a string to a number.
In this example we will use "1615 198th Street N.E.".
The result is 1615198.
The results using a Query would be
SELECT Val("1615 198th Street N.E.");
In a Form you could set the Default Value of a Textbox to
=Val("1615 198th Street N.E.")
In a Form add a TEXTBOX control and rename it "txtVal", then you could add the following in the Load Event.
Private Sub Form_Load()
txtVal = Val("1615 198th Street N.E.")