Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo box
Message
From
05/11/1999 12:14:10
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00287548
Message ID:
00287627
Views:
18
Hi Ellen.

>> In the table, it stores M or F. With the combo box, I want to list male and female. How do I store a 1-digit code but display a description in the combo box? <<

For this example, specifically:

RowSourceType = 0-None
BoundColumn = 2
ColumnCount = 2
ColumnWidths = < width of combo >, 0
ControlSource = < table >.< Field >

This code goes in the combo's init:

This.AddItem( 'Female' )
This.List[ This.NewIndex, 2 ] = 'F'
This.AddItem( 'Male' )
This.List[ This.NewIndex, 2 ] = 'M'
This.AddItem( 'Unknown' )
This.List[ This.NewIndex, 2 ] = 'U'

Marcia
Previous
Reply
Map
View

Click here to load this message in the networking platform