Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ComboBox RecordSource Options
Message
 
To
07/10/1998 21:42:19
Jim Underwood
Apollo Information Systems, Inc.
Houston, Texas, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00144858
Message ID:
00144885
Views:
28
cboCity Customer.City_ID SELECT City,City_ID from Cities

Jim,

In the cboCity combobox set the rowsourcetype to SQL but leave the rosource empty. In the Requery method of cboCity put code like this;
* cboCity equery
IF TYPE("THISFORM.cboState.Name") = "C"
   * The state cbo exists
   IF NOT EMPTY(THISFORM.cboState.Value)
      THIS.RowSource = "SELECT City,City_ID from Cities " + ;
                        "WHERE State = THISFORM.cboState.Value INTO CURSOR Temp"
   ELSE
      THIS.RowSource = "SELECT City,City_ID from Cities INTO CURSOR Temp"
   ENDIF
ELSE
   THIS.RowSource = "SELECT City,City_ID from Cities INTO CURSOR Temp"
ENDIF
Then from the when or interactivechange of the cboState simply;

THISFORM.cboCity.Requery()
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform