I have a list box on a form which pulls loans based on the center chosen in the first field on the form.
It automatically chooses the first loan to prevent a non-record chosen.
I am getting an error when I have a center with no loans.
This is the code (Event Procedure) to choose the first-when not null, but I'm still getting the error. I am a novice with Access, so what am I missing? The list box is named Loanlists.
Private Sub LoanLists_GotFocus()
If Not IsNull(Me.LoanLists) Then
Me.LoanLists = Me.LoanLists.ItemData(0)
End If
End Sub
It automatically chooses the first loan to prevent a non-record chosen.
I am getting an error when I have a center with no loans.
This is the code (Event Procedure) to choose the first-when not null, but I'm still getting the error. I am a novice with Access, so what am I missing? The list box is named Loanlists.
Private Sub LoanLists_GotFocus()
If Not IsNull(Me.LoanLists) Then
Me.LoanLists = Me.LoanLists.ItemData(0)
End If
End Sub