Problem with combobox and list

G

Guest

I have a form with a combobox and a list. The list is dependent on the
selection in the combobox. When the user makes a selection in the combobox i
do a requery of the list. The next step for the user is to select a single
line in the listbox. The problem is that this is not possible because the
focus is still on the combobox. I have tried to move the focus with the
setfocus method and the itemdata property of the listbox, but it does not
work.

This is my code

Private Sub comboVelgMnd_AfterUpdate()
Me.lstMndMenyer.Requery
Me.lstMndMenyer.Value = Me.lstMndMenyer.ItemData(0)
Exit Sub
 
G

Guest

When I try this, I get an error message. The message is in Norwegian. but it
is something like this in English

Error code 2110
Microsoft Acces cannot move the focus to the controll lstMndMneyer

--
___________
Regards
JaydDe


Svetlana skrev:
 
J

Jeff Boyce

Your refer to a control named "lstMndMneyer" and a control named
"lstMndMenyer".

Are these supposed to be the same? It sounds like Access can't find the
spelling...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

Guest

No that was just a spelling mistake I made when I made this tread.

I have been looking around a bit to see if others have had the same problem
and I found a tread from Steve Jensen from 23.04.2006 with the following
headline:

"Listbox acts like it is bound when it is not"

This describe a very similar problem to what I am experiencing, but a much
better description than what I am cabable to do. But unfortunately it it
gives no solution. Maybe someone could read it and maybe understand the
problem better, and then come up with the solution

___________
Regards
JaydDe
Norway

Jeff Boyce skrev:
 

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