G
Guest
This code successfully highlights an item in a ListBox.
But hwne the code in the Public lstCategory_AfterUpdate event fires off
lstCategory has a value of "Null" rather than the value of the highlighted
item.
Does anyone know what I'm doing wrong?
Any comments would be appreciated.
Set rsRecordset = CodeDb.OpenRecordset( _
"SELECT bytCategory" & _
" FROM tblGraphOptionsSelected_Category" & _
" WHERE intOperator = " & gintCurrentOperatorID, dbOpenSnapshot)
With Forms("frmSwitchboard_Main")
If Not rsRecordset.EOF Then
For intItem = 0 To
..sfrmGraphs.Form.sfrmGraphOptions.Form.lstCategory.ListCount - 1
If
Val(.sfrmGraphs.Form.sfrmGraphOptions.Form.lstCategory.ItemData(intItem)) =
rsRecordset!bytCategory Then
..sfrmGraphs.Form.sfrmGraphOptions.Form.lstCategory.Selected(intItem) = True
End If
Next
.sfrmGraphs.Form.sfrmGraphOptions.Form.lstCategory_AfterUpdate
End If
End With
But hwne the code in the Public lstCategory_AfterUpdate event fires off
lstCategory has a value of "Null" rather than the value of the highlighted
item.
Does anyone know what I'm doing wrong?
Any comments would be appreciated.
Set rsRecordset = CodeDb.OpenRecordset( _
"SELECT bytCategory" & _
" FROM tblGraphOptionsSelected_Category" & _
" WHERE intOperator = " & gintCurrentOperatorID, dbOpenSnapshot)
With Forms("frmSwitchboard_Main")
If Not rsRecordset.EOF Then
For intItem = 0 To
..sfrmGraphs.Form.sfrmGraphOptions.Form.lstCategory.ListCount - 1
If
Val(.sfrmGraphs.Form.sfrmGraphOptions.Form.lstCategory.ItemData(intItem)) =
rsRecordset!bytCategory Then
..sfrmGraphs.Form.sfrmGraphOptions.Form.lstCategory.Selected(intItem) = True
End If
Next
.sfrmGraphs.Form.sfrmGraphOptions.Form.lstCategory_AfterUpdate
End If
End With