General information
Category:
Coding, syntax & commands
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only