Thanks Todd. SET EXACT was indeed the problem. I went with IF EMPTY() function.
>Go to the command window and type these lines, and take a look at what they give back:
>
>? "A" = "ABC"
>? "ABC" = "A"
>? "" = "A"
>? "A" = ""
>? "" == "A"
>? "A" == ""
>
>I think that will get you on the right track!
>
>>I have a form to let users change the details of an order (for example to add or delete product quantity). I have txtBoxes for Product and Qty (the ControlSources are mProduct and mQty, respectively). In the Valid of each txtBox, I call a method I have created called CalcQty (ThisForm.CalcQty(.T.)). So, once the user has entered both the Product number and the Qty, the program is to then do a calculation and update some other txtBoxes that I also have on this same form -- txtBoxes for Original Qty and Adjusted Qty.
>>
>>Here is the CalcQty Method:
>>
>>
>>LPARAMETERS plCalc
>>
>>IF plCalc = .T.
>>
>> * IF Product or Qty hasn't been input, can't do calculations!
>> IF mProduct = ""
>> RETURN
>> ENDIF
>>
>> IF mQty = 0
>> RETURN
>> ENDIF
>>
>> DO CASE
>> * CASE Add Product
>> CASE blah,blah,blah
>>
>> * CASE Delete Product
>> CASE blah,blah,blah
>> ENDCASE
>>
>> ThisForm.Refresh()
>>
>>ENDIF
>>
>>
>>The problem is that IF mProduct = "" doesn't seem to be working. When mProduct equals = "" then you are indeed RETURNed. But when mProduct = something different, like "281600", you are also RETURNed. I have looked at it running the Debugger. For example, when the Debugger says that mProduct = "281600" the IF mProduct = "" statement seems to evaluate to True (even though it should evaluate to False), and you are RETURNed. So the calculations *NEVER* get done. So frustrating! The IF mQty statement seems to be evaluating without a problem.
>>
>>Why the difference? Any help would be most appreciated. TIA, Chuck Henry.
Chuck Henry