Hi!
I have been plagued by this question off and on since I started trying to learn Visual Fox. I create a textbox which will hold a numeric value. On the first pass thru I can use it as a numeric value and all is well. Sometime in the processing, I get an error and the field is now char. This usually happens when I have blanked it out and set focus there to get a new value. I don't want a 0 (zero) to show there so how can I handle this?
Now I have resorted to just testing to see what type it is and acting accordingly but I know there must be a way to force it so I can be sure of what I am getting. The situation that is getting to me is the customer number, a numeric field and used in most queries and indexes so I have to know what I am getting in the VALUE property of the textbox.
I am sure this is something I should know but apparently I don't or can't think of it.
A push in the right direction would be much appreciated.
I tried just making it a char field and always taking VAL but sometimes it shows up numeric and I have the opposite problem.
Judi
I have been plagued by this question off and on since I started trying to learn Visual Fox. I create a textbox which will hold a numeric value. On the first pass thru I can use it as a numeric value and all is well. Sometime in the processing, I get an error and the field is now char. This usually happens when I have blanked it out and set focus there to get a new value. I don't want a 0 (zero) to show there so how can I handle this?
Now I have resorted to just testing to see what type it is and acting accordingly but I know there must be a way to force it so I can be sure of what I am getting. The situation that is getting to me is the customer number, a numeric field and used in most queries and indexes so I have to know what I am getting in the VALUE property of the textbox.
I am sure this is something I should know but apparently I don't or can't think of it.
A push in the right direction would be much appreciated.
I tried just making it a char field and always taking VAL but sometimes it shows up numeric and I have the opposite problem.
Judi