Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo Question
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Miscellaneous
Thread ID:
00352936
Message ID:
00353002
Views:
18
I wouldn't put this in the KeyPress event, as Nadya suggested because that won't fire with a mouse selection. You'd either have to create a custom method, which you'd call from Keypress and Interactivechange or duplicate the code. Do you really intend for this code to be run with each keystroke when the user types in a selection? If not, I'd suggest using the Valid instead.

>I have a combo with incremental search on a form. In the interactive change event, I have this code:
>
>
LOCAL l_cSeekDoc
>WITH THISFORM
>	.LOCKSCREEN=.T.
>	l_cSeekDoc=.cbocode.VALUE
>	SELECT DOCUMENT
>	SEEK l_cSeekDoc
>	.txtrmrev.value=alltrim(DOCUMENT.revision)
>	.txtrmname.value=alltrim(DOCUMENT.TITLE)
>	This.value=l_cSeekDoc
>	SELECT devdata
>	.txtrmrev.readonly=.t.
>	.txtrmname.readonly=.t.
>	.txtQuantity.setfocus()
>	.REFRESH()
>	.LOCKSCREEN=.F.
>ENDWITH
>
>It works as I had hoped if the user chooses the cbocode with the mouse...the other information is placed in the appropriate fields and the curser is moved to the quantity.
>
>But this doesn't have the desired effect when a user tabs into the cbocode field and tries to key in the code number. How can I make this work? I would like either data entry approach to work.
>
>TIA,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform