M
martin stirrup
I've got a problem with a bit of Access VB code that worked in our school
reporting system in XP version of Office 2003 for years but now dies in vista
version of 2007...
I'm getting :Runtime error 7777
you used ListIndex property incorrectly
when it tries to move on to the next record in the subroutine
Private Sub cmdOK_Click()
Dim intNextRecord As Integer
intNextRecord = cboStudent.ListIndex + 1
If intNextRecord = cboStudent.ListCount Then
intNextRecord = 0
End If
cboStudent.SetFocus
cboStudent.ListIndex = intNextRecord 'this line gives the grief'
End Sub
I've tried looking this up but there is some confusion as to whether
ListIndex is read/write or read only in 2007. How else can I easily make this
move on to the next record?
PS I'm no programmer, so make it simple and easily intelligable please!
reporting system in XP version of Office 2003 for years but now dies in vista
version of 2007...
I'm getting :Runtime error 7777
you used ListIndex property incorrectly
when it tries to move on to the next record in the subroutine
Private Sub cmdOK_Click()
Dim intNextRecord As Integer
intNextRecord = cboStudent.ListIndex + 1
If intNextRecord = cboStudent.ListCount Then
intNextRecord = 0
End If
cboStudent.SetFocus
cboStudent.ListIndex = intNextRecord 'this line gives the grief'
End Sub
I've tried looking this up but there is some confusion as to whether
ListIndex is read/write or read only in 2007. How else can I easily make this
move on to the next record?
PS I'm no programmer, so make it simple and easily intelligable please!