Is it possible to enter numbers in the number field with exceptions

yepwingtim

Registered User.
Local time
Today, 12:37
Joined
Jun 6, 2008
Messages
126
hi i am trying to enter only numbers in my number field but sometimes i need to put pending in that number tab how can i do that? without using the text field thanks
________
Jeep Sj
 
Last edited:
No it's not! What exactly are you doing with this number? Access is actually pretty forgiving about using a field that is all digits as number, even though they're typed as text. For instance, code like this will work, producing the correct results, if Me.FakeNumField looks like a number:

Private Sub Command2_Click()
If IsNumeric(Me.FakeNumField) Then
MsgBox Me.FakeNumField * Me.MultiplierField
End If
End Sub

If you run into a situation where it doesn't work, you can cast or coerce the text field to a numeric type by using such functions as CInt(), CDbl(), etc.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom