ghudson
Registered User.
- Local time
- Today, 12:24
- Joined
- Jun 8, 2002
- Messages
- 6,194
How can I grab the value of my list box? I have a list box named lbVarianceTotals. I want to filter the record set based on the single selection of the list box using the DoubleClick event on the list box. When I run my code below, I am getting an invalid use of Null error. The value that is placed in the Filter properties is only the two single quotes. Account = '' What am I doing wrong?
Thanks in advance for your help!
Code:
Private Sub lbVarianceTotals_DblClick(Cancel As Integer)
On Error GoTo Err_lbVarianceTotals_DblClick
Me.FilterOn = True
DoCmd.ApplyFilter , "Account = " & "'" & lbVarianceTotals & "'"
Exit_lbVarianceTotals_DblClick:
Exit Sub
Err_lbVarianceTotals_DblClick:
MsgBox Err.Number & " - " & Err.Description
Resume Exit_lbVarianceTotals_DblClick
End Sub