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

Operator/Operand type mismatch

Status
Not open for further replies.

DionisM

Programmer
Oct 7, 2020
3
MK
Can someone help me?? I got this error Operator/Operand type mismatch

Here is the code"

sifraww=thisform.bz1_sifra.Value

thisform.bz1_naziv.Value=" "
thisform.bz1_nazen.value=" "
thisform.bz1_krat.value=" "
thisform.bz1_status.value=" "
thisform.bz1_sifra.Value=" "

IF thisform.bz1_sifra.Value>0

LOCAL laa
DECLARE laa[5]
ima=0
select bz1_sifra,bz1_naziv,bz1_nazen,bz1_krat,bz1_status;
FROM bz1 WHERE bz1_sifra=sifraww INTO ARRAY laa
IF _tally>0
ima=1

thisform.izbor.Caption="PROMENA"
ELSE
thisform.izbor.Caption="NOV"
ENDIF

thisform.pole_t
thisform.cmd_zapis.Enable=.T.


endif
 
Error is here -> IF thisform.bz1_sifra.Value>0
 
You have initialised thisform.bz1_sifra.Value with " " (character) and then evaluated it ( thisform.bz1_sifra.Value>0) as a number. Change it to thisform.bz1_sifra.Value # " " or something like that depending on what you need.

 
Spot on MM0000, you are comparing apples against washing machines. You could do this:
Code:
IF !Empty(thisform.bz1_sifra.Value)

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top