Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP6SP5 - Unselect Combo selection
Message
From
06/06/2003 07:53:44
 
 
To
05/06/2003 20:26:50
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00795134
Message ID:
00797129
Views:
107
Hi Alan.

The textbox is the currentcontrol, and in the gotfocus, I push the value to the cbo, and switch the currentcontrol to the cbo. In the lostfocus of the cbo, I push the value back to the textbox and switch the currentcontrol back. The grid stays looking neat, and I get the best of both worlds.

But why are you working so hard at it < s > ? This is all that you need to do if the combo is of style 2-Drop Down List.

Set up the grid column like this:
Bound = .F.
ControlSource = ( IIF ( SEEK( MyRecordSource.MyForeignKey, 'MyLookupTable', 'MyLookupTag' ), MyLookupTable.Description, '' ) )
Set up the combo with any RowSourceType except for 2-Alias or 6-Fields (using one of these RowSources will make the combo go blank when it has focus) like this:
ControlSource = MyRecordSource.MyForeignKey
BoundTo = .T.
RowSourceType = 3
RowSource = SELECT Description, PKField FROM MyLookupTable ORDER BY Description INTO CURSOR csrLookup NOFILTER
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform