Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Operator/operand type mismatch
Message
From
14/04/2008 05:51:29
 
 
To
14/04/2008 05:22:28
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01310335
Message ID:
01310344
Views:
10
Save yourself a lot of time and trouble, and try my second solution.

>hi,
>thank you for reply,
>i try , i see another error message
>
>Function argument value, type, or count is invalid
>
>
>If Not Used('trans1')
>    USE trans1.dbf Alias trans1 Again In 0 Shared
>Endif
>
>SELECT trans1
>USE trans1
>lnValutosearch=val(thisform.text4.value)&&Function argument value, type, or count is invalid
>
>lnValutosearch=thisform.text4.value &&Operator/operand type mismatch
>
>COUNT FOR trans1.fexerno=lnValutosearch TO thisform.text2.value
>WITH thisform.combo1
>thisform.text4.value=.list(.listindex,2)
>thisform.text5.value=.list(.listindex,1)
>ENDWITH
>
>
>>First of all, I once again remind you to NEVER use an object in any FOR condition, use a memory variable instead, it's soooo much faster!
>>
>>In this case the error message clearly says that one of your fields or textboxes is text and not numeric, or vice versa, so we can only guess here.
>>
>>lnValutosearch=val(thisform.text4.value)
>>COUNT FOR trans1.fexerno=lnValutosearch TO thisform.text2.value
>>Or, if you use SQL which makes it easier if you later must upgrade your application to SQL server:
>>lnValutosearch=val(thisform.text4.value)
>>Select fexerno from trans1 where fexerno=lnValutosearch into cursor curdummy
>>thisform.text2.value=_tally
>>
>>
>>>hi all,
>>>
>>>i use this code it work one time, if i try again i see error message Operator/operand type mismatch
>>>
>>>

>>>COUNT FOR trans1.fexerno=thisform.text4.value TO thisform.text2.value
>>><\pre>
>>>thanks
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform