View Single Post
  #9  
Old March 1st, 2010, 10:31 AM posted to microsoft.public.access.forms
RichardGarfield
external usenet poster
 
Posts: 7
Default Combo box does not react on first click

Daryl

Have found the problem but not the answer.

When I tab out of the previous control to the listbox, it works fine. If I
hit enter out of the previous control, it doesn't.

??

Richard

"Daryl S" wrote:

Richard -

Does this control have the focus before it is clicked on? Is there anything
in the prior droplist that hasn't completed when the droplist first drops?
What could be different between this one and the other dropdowns?

--
Daryl S


"RichardGarfield" wrote:

Daryl

Curiouser and curiouser...when it first gets focus and dropsdown, and I run
the cursor over it, it is dead and does not react to the cursor. But when I
click on the dropdown, it closes and leaves the box empty. It does not fire
the AfterUpdate either. When I drop it down manually the second time, the
reacts normally.

Any more ideas?

Richard

"Daryl S" wrote:

Richard -

I'm not sure what is going on.

I would suggest adding some debug.print me.combobox.column(0) statements
(using your combobox name) in a few places:

GetFocus
Click
AfterUpdate

Then put a breakpoint in the top of each of these and see what the value is,
the first time through and the second. See where it is changing.

If you want to force a value, you can use the AfterUpdate event of the
control, and if the value is blank, you can drop down the list again.

--
Daryl S


"RichardGarfield" wrote:

Hi Daryl

Let me explain. The combobox is bound to a query and drops down on getting
focus. When you click on your choice, it closes without showing the choice in
the box. AfterUpdate fires with the box blank and it jumps to the next
control.
When you then return to it, drop it down again and choose, it shows the
correct choice.

Does that help?

Richard

"Daryl S" wrote:

Richard -

Does it not highlight on the first click, or does it highlight on the first
click but not execute code until the second click? Is this combo box bound
to a field in the recordsource?

--
Daryl S


"RichardGarfield" wrote:

Hi Daryl

Thanks for the suggestion. Unfortunately I don't use any click event. On
GotFocus it drops down automatically, and then reacts OnUpdate.

Richard

"Daryl S" wrote:

Richard -

Could you have used the double-click event for your code instead of the
click event?
--
Daryl S


"RichardGarfield" wrote:

I have 5 combo boxes on a form and all except one accept the chosen row at
the first click. I am tearing my hair out trying to find why only this one
reacts when it is dropped down and the row is clicked for the second time.

Please someone show me how stupid I am being.