List index property

Rich

Registered User.
Local time
Today, 16:45
Joined
Aug 26, 2008
Messages
2,898
Forms!Invoices![Combo64].ListIndex = 0 has worked fine for years but apparently I'm now using it incorrectly, any ideas?
 
Does the combobox have the focus before you set the listindex?
 
Yes the actual code is listed here, I guess you can't set the list index from another form

Private Sub InvDate_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String

Dim I As Integer
stDocName = "Invoices"
I = Me.Parent.CurrentRecord - 1
DoCmd.OpenForm stDocName

Forms!Invoices!Combo64.SetFocus
Forms!Invoices!Combo64.ListIndex = I
Forms!Invoices!Command73.SetFocus
Forms!Invoices!BeginningDate = Me.InvDate
Forms!Invoices!EndingDate = Me.InvDate
DoCmd.Close acForm, "frmInvAwIss"
End Sub
 
What error are you getting? Also is I ever negative?
 
Error 3777 you've used the list index incorrectly, from what I've read the list index is now read only, another useful update and improvement from Microsoft!:rolleyes:
 

Users who are viewing this thread

Back
Top Bottom