P
philippe_b
Hi !
Got a small problem, I have a datebase for UK contacts with UK
postcodes.
eg: "GU35 9LW"
As the first two letters indicates an area, I want to be able to use a
listbox to search in my query these first two letters, one of them or
any combination.
I did a first query to extract these first two letters then I created a
form with a multiple selection listbox. As the result of the listbox
cannot be use as such, I have a textbox showing the result of my
selection using this code:
Private Sub List17_AfterUpdate()
Dim varItem
Me.Text22 = ""
For Each varItem In Me.List17.ItemsSelected
If Len(Me.Text22) = 0 Then
Me.Text22 = """" & Me.List17.ItemData(varItem) & """"
Else
Me.Text22 = Me.Text22 & "," & """" &
Me.List17.ItemData(varItem) & """"
End If
Next varItem
End Sub
At the end my problem is that I cannot have the In(..) function
working.I also tried using the OR operator but still the same problem.
If anyone can help.
Got a small problem, I have a datebase for UK contacts with UK
postcodes.
eg: "GU35 9LW"
As the first two letters indicates an area, I want to be able to use a
listbox to search in my query these first two letters, one of them or
any combination.
I did a first query to extract these first two letters then I created a
form with a multiple selection listbox. As the result of the listbox
cannot be use as such, I have a textbox showing the result of my
selection using this code:
Private Sub List17_AfterUpdate()
Dim varItem
Me.Text22 = ""
For Each varItem In Me.List17.ItemsSelected
If Len(Me.Text22) = 0 Then
Me.Text22 = """" & Me.List17.ItemData(varItem) & """"
Else
Me.Text22 = Me.Text22 & "," & """" &
Me.List17.ItemData(varItem) & """"
End If
Next varItem
End Sub
At the end my problem is that I cannot have the In(..) function
working.I also tried using the OR operator but still the same problem.
If anyone can help.