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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you confirm that an entry is an integer?

Status
Not open for further replies.

purpledawn

Programmer
Jun 21, 2001
50
US
Can anyone help me with confirming that an entry in an textbox is an integer and not a float. I can confirm that it is numeric, using IsNumeric, but I am stuck with verifying that its an integer entry.

Thanks.
 
If varValue - Cint(varValue) > 0 Then
' not an integer


Should work.....maybe not the best but..... ****************************
Only two things are infinite, the
universe and human stupidity, and
I'm not sure about the former.
(Albert Einstein)

Robert L. Johnson III
MCSA, CNA, MCP, Network+, A+
w: robert.l.johnson.iii@citigroup.com
h: wildmage@tampabay.rr.com
 
Why not just set an input mask of 999999 and a format of FIXED, with Zero Decimal Places in your original data specification (eg., the table)

It will prevent any thing other than zero to 999,999 from being entered.

If it's an unbound guy, put the above in the form's text box property sheet.






Me? Ambivalent? Well, yes and no....
Another free Access forum:
More Access stuff at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top