A
Asbjørn Søbye
I've resently switched to Access 2003 (from 2000). When I open a form I get
an error message like this: "Run-time error '7777': You have used the
property ListIndex wrong" (poorly translated from norwegian ....). The
debugging highlightes the 5th line in the following procedure:
Private Sub Form_Open(Cancel As Integer)
Me.cbxMedlemsStatus.SetFocus
Me.cbxMedlemsStatus.ListIndex = 0
Me.cbxVelgMedlem.SetFocus
Me.cbxVelgMedlem.ListIndex = 0
' Finn postene som passer til kontrollen.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[MedlemsID] = " & Str(Me![cbxVelgMedlem])
Me.Bookmark = rs.Bookmark
End Sub
When I remove the line the procedure runs, but then the combobox is empty
instead of showing the first value (as you would expect, but not want to
happen).
And why doesn't the first ListIndex cause the same error?
I hope you can help me out, it's frustrating .....
Asbjørn Søbye
an error message like this: "Run-time error '7777': You have used the
property ListIndex wrong" (poorly translated from norwegian ....). The
debugging highlightes the 5th line in the following procedure:
Private Sub Form_Open(Cancel As Integer)
Me.cbxMedlemsStatus.SetFocus
Me.cbxMedlemsStatus.ListIndex = 0
Me.cbxVelgMedlem.SetFocus
Me.cbxVelgMedlem.ListIndex = 0
' Finn postene som passer til kontrollen.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[MedlemsID] = " & Str(Me![cbxVelgMedlem])
Me.Bookmark = rs.Bookmark
End Sub
When I remove the line the procedure runs, but then the combobox is empty
instead of showing the first value (as you would expect, but not want to
happen).
And why doesn't the first ListIndex cause the same error?
I hope you can help me out, it's frustrating .....
Asbjørn Søbye