Good Day All,
I want to reference an empty listbox. I tried "" and Null but none of them works. The code is below. Both are ignored when this code is applied as an event and the listbox is empty. An error message comes up suggesting "invalid use of null"
Can this please be explained and corrected.
I want to reference an empty listbox. I tried "" and Null but none of them works. The code is below. Both are ignored when this code is applied as an event and the listbox is empty. An error message comes up suggesting "invalid use of null"
Can this please be explained and corrected.
Code:
Private Sub Command0_Click()
Dim StartYear As String
If Me.List3.Value = "" Then MsgBox "George"
If Me.List3.Value = Null Then MsgBox "George"
StartYear = Me.List3.Value
DoCmd.OpenReport "Application Registration Graduation and Dropouts", acViewReport, , "[Year] =" & "'" & StartYear & "'"
End Sub