Combo Box: Acts "Locked" Until Some Other Field Updated?

P

(PeteCresswell)

Got a form with a couple of bound combo boxes on it.

Both combo boxes act as if .Locked=True until one of the text
controls on the form receives a keystroke.

I don't have to type anything in to them - just putting the
cursor in the field and tabbing out will do the trick. Once
that's done, both combo boxes act normally.

Immediate window says that .Enabled=True and .Locked=False for
both.

I'm totally clueless.

Anybody got an idea of what's going on?
 
B

Bill Mosca, MS Access MVP

Pete

Take a look at the properties for the text box. There has to be something in
one of the events that is unlocking the combo.

Since tabbing out seems to be the trigger, I'd look at the On Exit or Lost
Focus event first.
 
P

(PeteCresswell)

Per Bill Mosca, MS Access MVP:
Take a look at the properties for the text box. There has to be something in
one of the events that is unlocking the combo.

Since tabbing out seems to be the trigger, I'd look at the On Exit or Lost
Focus event first.

It's looking to me like the parent form is goofey.

Tried it with no events at all, same thing.

Opened up the subform where the offending combo box lives as a
standalone form, and the problem went away.

Created a skeleton parent form and put the subform in it... and
the problem was still not present.

Next I'll export the parent form as text and then import it.

If that doesn't work, I guess I'll start slogging though the
process of re-creating the parent form from scratch.
 
J

Jason Lepack

Just search the code for the two forms for the name of that combobox.
Somewhere in the code it's setting the locked value to true.

Cheers,
Jason Lepack
 
P

(PeteCresswell)

Per Jason Lepack:
Just search the code for the two forms for the name of that combobox.
Somewhere in the code it's setting the locked value to true.

It turned out tb the .AllowEdits prop of the parent form.

It was set to False.

Somehow, tabbing in-and-out of a text field set it to true -
allowing the combo boxes to function normally.

I reset Parent.AllowEdits=True and the problem went away.

Whew!!!!!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top