Hi,
I am trying to change the property LimitToList of a unbound combobox in
runtime, but it doesn't work.
"Microsoft Access can't set the LimitToList property to No right now."
Why? Access Help doesn't say that we cannot change this property in runtime.
What can I do?
Thanks
Martin
Doogle - 26 Jul 2005 13:58 GMT
I believe you'll need to open the form in design view, change the LimitToList
property, and reopen in form view (this can all be done programmatically;
precede the code with 'DoCmd.Echo False' and close it with 'DoCmd.Echo True'
once the rest of the code is running OK)
Out of curiosity, is there a reason for changing the property in runtime?
Another possible solution would be to have an 'OnLostFocus' event on the
combo box itself so that, if the conditions exist which demand a 'limit to
list', you can test whether the value is in the list & react accordingly -
otherwise, when 'limit to list' isn't necessary, the test is bypassed. A bit
more coding needed, but probably faster for the user.
Any help?

Signature
Laury Burr a.k.a. Doogle
> Hi,
> I am trying to change the property LimitToList of a unbound combobox in
[quoted text clipped - 6 lines]
> Thanks
> Martin
Rick Brandt - 26 Jul 2005 14:12 GMT
> Hi,
> I am trying to change the property LimitToList of a unbound combobox
[quoted text clipped - 3 lines]
> Why? Access Help doesn't say that we cannot change this property in
> runtime. What can I do?
Not many, but a few properties can only be changed in design view.
LimitToList might be one of them. Instead just have two identical
ComboBoxes. One with LTL true and one with LTL false and toggle which one
is visible.

Signature
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com