Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Want to check if a field is a number in VB

Status
Not open for further replies.

Larshg

Programmer
Mar 1, 2001
187
0
0
DK
Hi

I would like to check if a field is a number in Visual Basic code.

Thanks
 
Does anyone know if there is a isNotNumeric funktion - I can't get it to work for me. This is the code for it

If IsNotNumeric(Me.EstimatedRunTime) Then
strMsg = "The fiels Estimated Run Time has to be a number - it is the Run time in minnutes"
MsgBox strMsg
Else


DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

 
there is no isNotNumeric function but u can do it this way

If Not IsNumeric(Me.EstimatedRunTime) Then
strMsg = "The fiels Estimated Run Time has to be a number - it is the Run time in minnutes"
MsgBox strMsg
Else


DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top