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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ListView Control AfterUpdate event

Status
Not open for further replies.

NSNewey

Programmer
Jun 29, 2005
125
GB
Hi,

I have an access 2003 form with a ListView Control (MSComctlLib.ListViewCtrl.2)

I can trap the user selecting a row in the list using the click event.

I am trying to trap when a user uses the arrow up and down keys which change the selected item in the list.

I have tried afterUpdate and ItemChanged but they don't fire or maybe are not even events in a listView

Does anyone know which event I need to trap?
 
Hi,
Solved the problem and posted it here in case anyone else has similar issues...
Code:
Private Sub lstView_KeyUp(KeyCode As Integer, ByVal Shift As Integer)
[green]'list position has now moved so refer to selecteItem here[/green]
End Sub

I can now trap the Ascii 38 and 40 of the up and down arrows to know if the position has moved.

However, if anyone has a better idea then please come back.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top