A
Anne
I found this code on Ken Snell's website, which is great for use by one of my
clients, where the user can scroll to the next employee, using this format.
Works great, however, I would like to add some code, where, when the last
employee has been reached, the arrow gets un-highlighted.
Here is the code for the arrow down:
Private Sub cmdDownCbo_Click()
' ------------------------------------------------
'
' Code written by Ken Snell, Microsoft MVP
' 12 June 2005
' Copyright Ken Snell
'
' This code and the combo box and spin button
' controls can be used in any application as
' long as the "copyright" notice is unchanged.
'
' The code cannot be published or distributed
' by any other person except as part of a
' developed ACCESS database application.
'
' ------------------------------------------------
Dim lngCboItem
On Error Resume Next
lngCboItem = Me.EmployeeSelect.ListIndex + 1
If lngCboItem <= Me.EmployeeSelect.ListCount - 1 Then _
Me.EmployeeSelect.Value = Me.EmployeeSelect.ItemData(lngCboItem)
Me.EmployeeSelect.SetFocus
Call EmployeeSelect_AfterUpdate
End Sub
http://www.cadellsoftware.org/SampleDBs.htm
clients, where the user can scroll to the next employee, using this format.
Works great, however, I would like to add some code, where, when the last
employee has been reached, the arrow gets un-highlighted.
Here is the code for the arrow down:
Private Sub cmdDownCbo_Click()
' ------------------------------------------------
'
' Code written by Ken Snell, Microsoft MVP
' 12 June 2005
' Copyright Ken Snell
'
' This code and the combo box and spin button
' controls can be used in any application as
' long as the "copyright" notice is unchanged.
'
' The code cannot be published or distributed
' by any other person except as part of a
' developed ACCESS database application.
'
' ------------------------------------------------
Dim lngCboItem
On Error Resume Next
lngCboItem = Me.EmployeeSelect.ListIndex + 1
If lngCboItem <= Me.EmployeeSelect.ListCount - 1 Then _
Me.EmployeeSelect.Value = Me.EmployeeSelect.ItemData(lngCboItem)
Me.EmployeeSelect.SetFocus
Call EmployeeSelect_AfterUpdate
End Sub
http://www.cadellsoftware.org/SampleDBs.htm