RE: Type mismatch Cesar Mugnatto 19.Oct.07 02:31 PM a Web browser Domino Designer 7.0.2Windows 2000
The first tip I would suggest is to make sure your code stores values consistently. Either store numbers as numbers (preferable) or store them always as text (knowing that if you need to do math operations on them, you will need to convert them to numbers).
IsNumeric is not really a valid test for what you are trying to accomplish. From Designer Help:
The IsNumeric function returns TRUE (-1) if the value of expr is a numeric value or can be converted to a numeric value. The following values are numeric:
String (if interpretable as number)
Boolean (TRUE, FALSE)
What you can do is always apply CInt() to any value - if already an integer, it won't matter and if String (unless ""), it will be converted to a number (at least within your scenario).
So, I would first check if the CStr() is "" and if not, apply CInt().
That should solve the problem. Sorry I can't help further because I could quite understand what your code was supposed to be doing - I'm offering suggestions on how to compare numbers and strings only.