G
Guest
MS Access 2K, Windows XP
====================
Hi,
I have a form with a combo-box whose row source is a query. I want to give
the user an option to sort the data for the comb-box by two different
variables. To accomplish that, I have an Option Group/frame with 2 options,
and based on the selected value, I set the row source for the combo-box. The
Option Group/frame has a default value (to ensure that there will be a sort
criteria).
I've placed the code in the "On Enter" event of the combo-box, where I set
the row source for it based on the value of the Option Group/frame, and also
have a requery statement before I exit the On Enter event.
It is working fine, but I wanted to get a second opinion if possible, to
make sure that I am doing this the correct way.
Do I need to place the (same) code in any other event? Do I need to check
for any thing else, any errors etc.?
Will appreciate any feedback on this.
Thanks.
-Amit
====================
Hi,
I have a form with a combo-box whose row source is a query. I want to give
the user an option to sort the data for the comb-box by two different
variables. To accomplish that, I have an Option Group/frame with 2 options,
and based on the selected value, I set the row source for the combo-box. The
Option Group/frame has a default value (to ensure that there will be a sort
criteria).
I've placed the code in the "On Enter" event of the combo-box, where I set
the row source for it based on the value of the Option Group/frame, and also
have a requery statement before I exit the On Enter event.
It is working fine, but I wanted to get a second opinion if possible, to
make sure that I am doing this the correct way.
Do I need to place the (same) code in any other event? Do I need to check
for any thing else, any errors etc.?
Will appreciate any feedback on this.
Thanks.
-Amit