I have 2 ListBoxes, ColumnCount=1 with lbxAlpha1.RowSo urce = "A";"C";"E" ; . . . and lbxAlpha2.RowSo urce = "B";"D";"F" ; . . . All works fine as long as I only use one of the ListBoxes. When I have used one, and click the other, I get run-time error '94', and the value for the ListBox is Null.
The error occurs at the Call NewLetter() for the WRONG ListBox (See Code Below).
I have skipped the Call statement and with 'Step Into' determined that the form/click called the _click procedure, not elsewhere in the code.
If I remove the clearing of the other box by removing the lbxAlpha1 & 2 statements, then both ListBoxes have Null values at the point of error, even though the correct letter is highlighted on the form in each ListBox.
Find for entire project for 'lbxAlpha' does not find any other occurrances except initialization in Form_Load.
Any suggestions?
Windows XP & Access 2002
Private Sub lbxAlpha1_Click ()
lbxAlpha2 = ""
Call NewLetter(lbxAl pha1)
End Sub 'lbxAlpha1_Clic k
Private Sub lbxAlpha2_Click ()
lbxAlpha1 = ""
Call NewLetter(lbxAl pha2)
End Sub 'lbxAlpha2_Clic k
From the form, I click lbxAlpha1=A, then C, then E, then F and error occurs @Call NewLetter(lbxAl pha1) in Sub lbxAlpha1_Click (), but I should be in Sub lbxAlpha2_Click ()
The error occurs at the Call NewLetter() for the WRONG ListBox (See Code Below).
I have skipped the Call statement and with 'Step Into' determined that the form/click called the _click procedure, not elsewhere in the code.
If I remove the clearing of the other box by removing the lbxAlpha1 & 2 statements, then both ListBoxes have Null values at the point of error, even though the correct letter is highlighted on the form in each ListBox.
Find for entire project for 'lbxAlpha' does not find any other occurrances except initialization in Form_Load.
Any suggestions?
Windows XP & Access 2002
Private Sub lbxAlpha1_Click ()
lbxAlpha2 = ""
Call NewLetter(lbxAl pha1)
End Sub 'lbxAlpha1_Clic k
Private Sub lbxAlpha2_Click ()
lbxAlpha1 = ""
Call NewLetter(lbxAl pha2)
End Sub 'lbxAlpha2_Clic k
From the form, I click lbxAlpha1=A, then C, then E, then F and error occurs @Call NewLetter(lbxAl pha1) in Sub lbxAlpha1_Click (), but I should be in Sub lbxAlpha2_Click ()
Comment