DBServices
Programmer
I have a list box that is used to display info only. I am looping through a recordset and displaying the fields using the add item method, however, one of my variables will be null for some records and have a value for others. I get the "Invalid Use of Null" error when the var is null. I have tried to use the If Not IsNull(variable name) but can't get it to work....Any and all help will be greatly appreciated...
the variable "subItemPrep" will sometimes be null so I want it to just not add anything for that...
Code:
Do While Not rsSubItems.EOF
subItemID = rsSubItems!MenuItemDetailsID
subItemName = rsSubItems!MenuItemChoiceDescription
subItemPrep = rsSubItems!PrepName
lst.AddItem (subItemID & ";" & "-----" & subItemName & ";" & subItemPrep)
rsSubItems.MoveNext
Loop
rsItems.MoveNext