|
-
Jun 14th, 1999, 10:00 PM
#1
I'm trying to develop a form that has several combo boxes, each of which updates when another combo box changes.
Here is the problem I have come up against. When the form first loads, all the combo boxes are populated by tables. When one combo box is updated, it changes the rowsource of the others to queries. If you then go to one of those combo boxes that has a query as a rowsource and choose a value -- when the box loses focus it changes its value back to the first one in the list.
It seems to be that a combo box with a query as a rowsource doesn't work properly. Here is how you can recreate this very easily. Create a new form. Put two combo boxes on it. Set each of their rowsources to tables. In the afterupdate of the first combo box, change the second combo box's rowsource to a query. When you run this, change the value of the first combo box. Then try to change the value of the second one. It doesn't work.
If anybody wants to see the above example, I've saved it. Email me at [email protected].
Does anybody know why it doesn't work???
Thanks!
-
Jun 15th, 1999, 08:54 AM
#2
New Member
hai emerald
Do not bind combo box to data control at design time. Give rowsource property at runtime in form load event for all combo boxes which has query. Try using this.
all the best
Ganesh v
-
Jun 15th, 1999, 08:56 AM
#3
New Member
hai emerald
Do not bind combo box to data control at design time. Give rowsource property at runtime in form load event for all combo boxes which has query. Try using this.
all the best
Ganesh v
-
Jun 15th, 1999, 06:46 PM
#4
In the original project, I do set the rowsource property during runtime, not design time. Only in the example do I set it during design time because its simpler and it still has the same effect. It'll still do the same thing if you set the rowsource during form load (I have a whole procedure for setting all this stuff).
--EmeraldSpirit
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|