Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List Box Behavior - Access 2007

Status
Not open for further replies.

bdbmeag

Programmer
Oct 5, 2008
15
US
Hi,

I have a form with two list boxes: one on the left and one of the right.

The list box on the right side always has data. The one on the left doesn't always have data.

Situation 1: List Box on left side has no data.

I click the right List Box (the Got Focus event is triggered). I type a letter and the List Box scrolls to the first item starting with that letter.

Situation 2: List Box on left side has data.

I click the right List Box (the Got Focus event is triggered). In this situation the Lost Focus event is also triggered. I type a letter BUT the left List Box scrolls to the first item starting with that letter.

My question is: Why does the List Box on the right side trigger the Lost Focus event when there is data in the List Box on the left side of the form and why does that same List Box get the focus?

If a user selects the List Box on the right side then I need it to retain the focus until the user selects something else.

Thanks,

- Bruce
 
How are ya bdbmeag . . .

Thats a strange situation indeed, espcially since we need to see code? ... Focus events can get a little tricky.

In any case, the perferred event for detection is the [blue]After Update[/blue] event.

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 

I'm confused! And while that's not unusual these days, I have to ask: Has the Auto Expand Property been added to ListBoxes in v2007? Previous versions only had this property in ComboBoxes.

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Hi,

There is no code behind the events other than debug.print statements that I added to show me what was going on.

I placed the statement in the After Update event, which is what I thought would have been the case too, but it was not triggered.

As for an Auto Expand property I don't see that.

Thanks,
 
bdbmeag . . .

[blue]missinglinq's[/blue] post is paramount and needs to be answered! ... or do you really have comboboxes instead?



See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top