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

CInt error 1

Status
Not open for further replies.

cochise

Technical User
Mar 27, 2001
171
US
I an table I have field [DiscType] as text (this can't change). Some of the values are numbers some are actually text. I need to convert the numbers to integers. In a query I'm using CInt to convert these values to integers, however, the ones that aren't numbers are returning an error, #error#. How can I weed out these errors so that only the success CInt converts are displayed. I tried using >0 as criteria, which doesn't work. Any help would be greatly appreciated.
 
SELECT IIF(IsNumeric([DiscType]),CInt([DiskType]),"Not A Number") ...

or

... WHERE IsNumeric([DiscType])
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top