Testing for an integer

N

NH

What is the simplest and most effective way of testing whether or not a
number is infact an integer or not.

Is there a built-in function?

In Excel I would compare it to the Floor() of itself, but I am not sure with
Access...

Thanks

Nick
 
M

Mike Sherrill

What is the simplest and most effective way of testing whether or not a
number is infact an integer or not.

The answer turns on what *you* mean by "is in fact an integer".

Is a Long Integer an integer? Is the Double value 32.0 an integer?
Is the string "32" an integer? You might want to look at help for the
functions VarType(), TypeName(), and Int().
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top