Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using a Combo Box value as a paramater to another ComboB
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00782038
Message ID:
00782041
Views:
12
Gerard, what you're doing can be tricky. One suggestion (when adding records) is to disable CboBox2 and in the InterActiveChange Event of CBoBox1 enable CboBox2, set its RowSource and Requery() it. For editing records, you'll have to check whether CboBox1 has an appropriate value and enable/disable CboBox2 accordingly.

Another suggestion is to render CboBox2 invisible unless a valid value exists for CboBox1. If the correct value is chosen for CboBox1 interactively, use the InterActiveChange Event of CboBox1 to set the RowSource of CboBox2, Requery() it and make it visible. IF a correct value for CboBox1 exists on form Init(), make it visible then.

The dependency between the combo boxes (or any objects) underscores some of the complexity of event-driven programming, where users can click anywhere at any time and our interfaces have to be able to handle it.

John
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform