Charlotte Foust
charlotte.foust at gmail.com
Sun Dec 4 19:07:17 CST 2011
Simplest way to handle it is with stacked controls using the particular settings you need. Just set their visibility depending on the selection in listbox 2. No need to make design changes to the form, which is what you're doing when you change the property of the control itself. Charlotte Foust On Sun, Dec 4, 2011 at 4:58 PM, Darryl Collins < darryl at whittleconsulting.com.au> wrote: > It is not the active control itself, which I agree needs to retain its > state - at least while active, but the other listboxes on the form. > > For example I have a form where listbox 1's default setting is > 'multi-select' and if the user chooses more than one option from listbox 1, > then list box 2 can only allow a single option from its list (so > multi-select should = none for listbox 2). However if list box 1 has only > one option selected than listbox 2 should allow multi-select to be > available. So the multi-select status of listbox 2 has a dependency on > what the user selects (or doesn't select) in listbox 1 and visa versa. If > a user chooses multiple values in listbox 2 first, then only a single > option should be allowed from listbox 1 and the status change from multi to > single. > > Yep, I have a real live scenario where this has to happen. I have a work > around which basically fakes that behaviour and it works ok. I can > understand why you should not be able to change the state of the active > listbox, but you cannot change any listboxes on the form, unless you are in > design mode. > > Oh well.... Just curious - seems a bit like a case of laziness to me, but > there are often other implications I am yet to grasp, maybe this is one of > them. > > Cheers > Darryl. > > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto: > accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust > Sent: Monday, 5 December 2011 11:46 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Multi Select. > > It makes sense to me. A control is either going to be multiselect or not. > Why would you even want to change it on the fly? > > Charlotte Foust > > On Sun, Dec 4, 2011 at 4:15 PM, Darryl Collins < > darryl at whittleconsulting.com.au> wrote: > > > Hmmmm... Turns out you can only set this property when the form is in > > design mode, even via VBA. Why on earth would they do that? > > > > I have a couple of workarounds in the bag, so not looking for a > > solution (unless you have a really cool one you can share), but it > > seems like an odd thing to enforce on developers, especially as the > > form is nearly always going to be open and in use when you want to > > change that property 'on the fly'... > > > > Anyone got any thoughts on this? Just curious. > > > > Cheers > > Darryl. > > > > > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > > > > > > > Website: http://www.databaseadvisors.com > > > > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > >