P
Patti
I have a list box (LB1) that displays a list of clients. I have
another list box (LB2) that displays a list of phone calls. I want to
auto-select the first row in LB2 after the user selects a client in
LB1.
Here is my code:
Private Sub lstClients_AfterUpdate()
Me.lstCallLog.Requery
Me.lstCallLog.Selected(0) = True
End Sub
The problem is that when I click LB2, the LB1_AfterUpdate is
triggered. I have verified this by putting in a breakpoint in the
LB1_AfterUpdate event. The Click event, On Enter, On Got Focus, and
On Mouse Down events never fire for LB2! WHY???
The offending code is Me.lstCallLog.Selected(0) = True. When I
comment this out, the LB2_Click event works again, but that completely
defeats my purpose.
For testing purposes I created a new DB, and there is only one form in
my DB, and this is the ONLY code anywhere in the DB. Tables are
linked to a back end DB. Ultimately I want to limit the phone call
list to calls made to the client selected in LB1, but for testing
purposes I took out that criteria. LB2 now lists ALL phone calls in
tblPhoneCall.
Any help would be greatly appreciated!
Patti
another list box (LB2) that displays a list of phone calls. I want to
auto-select the first row in LB2 after the user selects a client in
LB1.
Here is my code:
Private Sub lstClients_AfterUpdate()
Me.lstCallLog.Requery
Me.lstCallLog.Selected(0) = True
End Sub
The problem is that when I click LB2, the LB1_AfterUpdate is
triggered. I have verified this by putting in a breakpoint in the
LB1_AfterUpdate event. The Click event, On Enter, On Got Focus, and
On Mouse Down events never fire for LB2! WHY???
The offending code is Me.lstCallLog.Selected(0) = True. When I
comment this out, the LB2_Click event works again, but that completely
defeats my purpose.
For testing purposes I created a new DB, and there is only one form in
my DB, and this is the ONLY code anywhere in the DB. Tables are
linked to a back end DB. Ultimately I want to limit the phone call
list to calls made to the client selected in LB1, but for testing
purposes I took out that criteria. LB2 now lists ALL phone calls in
tblPhoneCall.
Any help would be greatly appreciated!
Patti