Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where to retrieve combovalue for variable......?
Message
 
 
To
05/08/2000 01:58:01
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00398680
Message ID:
00401587
Views:
32
>>Hi Jimmy.
>>
>>>> need the previous stocknumber so that I can find it in the inventory table and clear the transaction number. Once I do that, I can requery and the old product no longer shows up related to this transaction. <<
>>
>>Add a customer property to your combo class called uOldVal. In the GotFocus of the combo, put code like this:
>>
>>This.uOldVal = This.Value
>>
>>Then, in the combo's valid, you can decide whether or not the user selected a new stock number like so and takle appropriate action:
>>
>>
<b>With THIS</b>
>>IF .ListIndex > 0
>>  IF IsNull( .uOldVal ) OR ( .uOldVal # .Value )
>>    *** The user selected a different product...take action
>>  ENDIF	
>>ENDIF
<b>Endwith</b>
>>
>>
>
>Marcia,
>
>Using the previous code just as it sits, I get an error on "IF .ListIndex > 0" stating that "Expression not valid outside of WITH/ENDWITH". That's what you determine the behavior of a property isn't it? I'm a little confused since .ListIndex is already a property. Can you clear this up for me?
>
>Thanks
>JD

JD,
See bolded mods above. You need to wrap the code in a With/Endwith. Either that or change all the property references to THIS.ListIndex, THIS.uOldVal, etc..
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform