listboxes

  • Thread starter Thread starter Hans Pikkemaat
  • Start date Start date
H

Hans Pikkemaat

Hi,

I have 2 listboxes (and some other stuff) on a form
The first listbox has an onclick event which, when fired, adds an item to
the second list box and sets the selected item to the last item which makes
sure the lists scrolls when full. This way I create a log screen where
the last lines are always shown.

When I click an entry in the first list, the item is added and selected
which is ok.
After this, each click on any control on the form, causes the click event
from the first list to be fired. It doesn't seem to respond as expected.

I found out that first setting focus to the second list box solves the
problem but I don't understand why this is necessary.
Can anyone explain this to me?

tx

HPI

PS: I'm doing this using access 2003 on XP
 
---------- Hans Pikkemaat said:
I have 2 listboxes (and some other stuff) on a form
The first listbox has an onclick event which, when fired, adds an item to
the second list box and sets the selected item to the last item which makes
sure the lists scrolls when full. This way I create a log screen where
the last lines are always shown.

When I click an entry in the first list, the item is added and selected
which is ok.
After this, each click on any control on the form, causes the click event
from the first list to be fired. It doesn't seem to respond as expected.

I found out that first setting focus to the second list box solves the
problem but I don't understand why this is necessary.
Can anyone explain this to me?

Hans,

this is not the normal behaviour. Please post the code you use.

Best regards
Emilia

Emilia Maxim
PC-SoftwareService, Stuttgart
http://www.maxim-software-service.de
 
The form may be corrupted. You could try to copy and paste all comtrols into
a new blank form, then do the same with the code. This will usually get rid
of any corruption.

Ragnar
 
Back
Top