Article ID: 138779
Article Last Modified on 7/1/2004
CREATE TABLE Friends (Name C(40), Address C(30), State C(2))
CREATE TABLE States (Fullname C(20), Abbrev C(2))
Full Name Abbreviation
-------------------------
Alaska AK
Colorado CO
Florida FL
Idaho ID
Maine ME
Ohio OH
Texas TX
ColumnCount = 3
Height = 200
Width = 448
RowHeight = 30
Column1: ControlSource = Friends.Name
Width = 152
Column2: ControlSource = Friends.Address
Width = 166
Column3: ControlSource = Friends.State
Bound = .F.
Width = 93
CurrentControl = Combo1
BoundColumn = 2
ColumnCount = 2
ColumnWidths = 75,0
ControlSource = Friends.State
RowSourceType = 6-Fields
RowSource = States.Fullname,Abbrev
Style = 2 - Dropdown List
IF !EMPTY(Friends.State)
This.Value = Friends.State
ELSE
This.DisplayValue = This.List(1)
ENDIF
** This lets you see the current state value in the combo box
** or if it is a new record it displays the first state in the list.
ON KEY LABEL F10 APPEND BLANK IN Friends
** Allows you to enter new records in the Grid.
ON KEY LABEL F10
</WWITEM>
<WWITEM>Save and run the Form.
Keywords: kbhowto KB138779