Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data type mismatch when im checking for the null
Message
From
05/03/2000 16:41:12
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00341920
Message ID:
00341923
Views:
18
>I get this error when i try to mulitply .071 tax with my sold price field. Because some of the soldprices are
>blank and then my varible gets loaded with .F. any ideas what I can do?
>I tried this but it still gives me the mismatch.
>
> if sales(1,1) <> .F.
> thisform.salestax.value = .071 * sales(1,1)
>end if
>
>Thanks Kelly

This is because if your array contains a numeric value, the check for .f. fails with the data type mis-match.

Try this:
IF TYPE("sales[1,1]")="N"   && is it numeric?
  thisform.salestax.value = .071 * sales[1,1]
ENDIF
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform