A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

determining if an entry is a number



 
 
Thread Tools Display Modes
  #1  
Old June 25th, 2004, 10:03 PM
dp
external usenet poster
 
Posts: n/a
Default determining if an entry is a number

Hi guys

I am creating an exchange program with quickbooks and tables it imports are text fields, even ones that represent numbers.

so, I must create a validation rule that ensures only numbers are entered in those fields. There is a function in Javascript - NaN that can tell validate if user entered text and not a number. Does anybody have function like this?

Thanks,
David
  #2  
Old June 25th, 2004, 10:12 PM
Ken Snell
external usenet poster
 
Posts: n/a
Default determining if an entry is a number

VBA has a function called IsNumeric, which will return True or False
depending upon whether the argument given to it is numeric or not.

?IsNumeric("1234.56")
True

?IsNumeric("ABS123")
False


--

Ken Snell
MS ACCESS MVP

"dp" wrote in message
...
Hi guys

I am creating an exchange program with quickbooks and tables it imports

are text fields, even ones that represent numbers.

so, I must create a validation rule that ensures only numbers are entered

in those fields. There is a function in Javascript - NaN that can tell
validate if user entered text and not a number. Does anybody have function
like this?

Thanks,
David



  #3  
Old June 25th, 2004, 10:51 PM
Douglas J. Steele
external usenet poster
 
Posts: n/a
Default determining if an entry is a number

But be aware that D and E are treated as numbers if they're in the midst of
the digits:

?IsNumeric("12E34")
True
?IsNumeric("12D34")
True


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Ken Snell" wrote in message
...
VBA has a function called IsNumeric, which will return True or False
depending upon whether the argument given to it is numeric or not.

?IsNumeric("1234.56")
True

?IsNumeric("ABS123")
False


--

Ken Snell
MS ACCESS MVP

"dp" wrote in message
...
Hi guys

I am creating an exchange program with quickbooks and tables it imports

are text fields, even ones that represent numbers.

so, I must create a validation rule that ensures only numbers are

entered
in those fields. There is a function in Javascript - NaN that can tell
validate if user entered text and not a number. Does anybody have

function
like this?

Thanks,
David





  #4  
Old June 26th, 2004, 01:15 AM
Ken Snell
external usenet poster
 
Posts: n/a
Default determining if an entry is a number

Excellent point.

The alternative if such things are not to be allowed, dp, would be to write
a function that literally looks at each character and determines if that
character is a number or not.

--

Ken Snell
MS ACCESS MVP

"Douglas J. Steele" wrote in message
...
But be aware that D and E are treated as numbers if they're in the midst

of
the digits:

?IsNumeric("12E34")
True
?IsNumeric("12D34")
True


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Ken Snell" wrote in message
...
VBA has a function called IsNumeric, which will return True or False
depending upon whether the argument given to it is numeric or not.

?IsNumeric("1234.56")
True

?IsNumeric("ABS123")
False


--

Ken Snell
MS ACCESS MVP

"dp" wrote in message
...
Hi guys

I am creating an exchange program with quickbooks and tables it

imports
are text fields, even ones that represent numbers.

so, I must create a validation rule that ensures only numbers are

entered
in those fields. There is a function in Javascript - NaN that can tell
validate if user entered text and not a number. Does anybody have

function
like this?

Thanks,
David







 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel- Inserting a varying number of rows Ken Wright Worksheet Functions 1 March 20th, 2004 10:20 PM
Excel 2002 "auto" number format Norman Harker Worksheet Functions 0 February 26th, 2004 04:40 AM


All times are GMT +1. The time now is 10:50 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.