Hello,
I'm trying to pass a value from a listbox to a filter used to filter a continuous form.
However, I get an error when I build the filter criteria with the following statement. "Access doesn't recognize ALKvalue as a fields."
However,
works fine.
What am I doing wrong?
Thanks,
Mila
I'm trying to pass a value from a listbox to a filter used to filter a continuous form.
Code:
Dim ALKvalue As Long
ALKvalue = Me.lstRanges.Column(5, 1)
Debug.Print ALKvalue 'prints out 0.2
However, I get an error when I build the filter criteria with the following statement. "Access doesn't recognize ALKvalue as a fields."
Code:
If (Me.chk_ALK = True) Then
Criteria = Criteria & "([ALK] >= ALKvalue) AND "
End If
However,
Code:
If (Me.chk_ALK = True) Then
Criteria = Criteria & "([ALK] >= 0.2) AND "
End If
works fine.
What am I doing wrong?
Thanks,
Mila