Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Misbehaving ComboBox
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00345022
Message ID:
00345036
Views:
21
Hi Richard.

>> If you type in the wrong code - the drop down combo need to open and steer you to the nearest code. I'm sure I have seen this done before but how? There is no "OpenList" command so I'm a bit stumped. <<

You might put code something like this in the combo's Valid:
IF This.ListIndex = 0 AND ! EMPTY( This.DisplayValue )
   *** user typed something in not in the list
   lcNear = SET( 'NEAR' )
   SET NEAR ON
   SELECT MyTable
   SEEK ALLTRIM( This.DisplayValue ) && if there is an index on the field
   SET NEAR &lcNear
   KEYBOARD '{ALT+DNARROW}'
   RETURN 0
ENDIF
This in untested and off the top of my head, but you should be able to use it as a starting point to get what you want.

Marcia
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform