Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ComboBox RecordSource Options
Message
From
07/10/1998 21:42:19
Jim Underwood
Apollo Information Systems, Inc.
Houston, Texas, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
ComboBox RecordSource Options
Miscellaneous
Thread ID:
00144858
Message ID:
00144858
Views:
83
What is the best approach to provide for two different SQL SELECT criteria for a ComboBox RecordSource?

For example, suppose you have a form with two ComboBoxes:
  
Control Control Source RowSource
cboState Customer.State_ID SELECT State,State_ID from States
cboCity Customer.City_ID SELECT City,City_ID from Cities
<\pre>

What I'd like to do is for the cboCity do display one of the following lists:

(1) IF the cboState control source (Customer.State_ID) is 0 or empty, show ALL cities for ALL states

(2) Otherwise show only the Cities whose Cities.State_ID = Customer.State_ID entered in the cboState control.

I know how to write the SQL SELECT for both of these cases, but how do I change the RecordSource of the cboCity control during runtime?

TIA,
jmu
Best Regards,

Jim Underwood
Apollo Information Systems, Inc.
Houston, TX
Next
Reply
Map
View

Click here to load this message in the networking platform