Am I missing something here, should one of the number formats for the
text
box in the table work the way I want it to? Tried byte, single, etc.
Curtis
This example takes leading digits, kills any sign, and drops the
decimal
point:
Private Sub Text0_AfterUpdate()
If Not IsNull(Me.Text0) Then
Me.Text0 = Replace(Abs(Val([Text0])), ".", "")
End If
End Sub
message
Yes it is bounded, but the box is text, I tried number formats
before
and
nothing works as the number must be like that below, no commas,
decimals,
etc.
Curtis
If this text box is bound to a Number field, you don't have to do
anything.
Access will remove the leading zeros for you.
If the control is unbound, set its Format property to:
General Number
Access will recognise it as a number (provided you paste a number)
and
remove the leading zeros.
If you need to code it, use Val().
Test if is IsNull() first.
message
What coding would accomplish this in a text box?
When you enter or paste a number like this:
000027250546897
It will then become this:
27250546897
On the after update or whichever is event most appropriate.
Thanks
Curtis