G
Guest
I have a simple list box which I hope to use as criteria in a query. So far
it works, but only if there is one item selected. With more than one item, I
get "Error 2001 - You canceled the previous operation" when I try to run the
query. I'm using Access 2000.
Public Function PoolsCrit()
Dim PoolChos As Variant, Pools As String
For Each PoolChos In
Forms![PoolCommitSelection]![PoolSelector].ItemsSelected()
If Len(Pools) <> 0 Then Pools = Pools & " Or "
Pools = Pools & Forms![PoolCommitSelection]![PoolSelector].Column(0,
PoolChos)
Next PoolChos
PoolsCrit = Pools
End Function
"PoolSelector" is the name of the simple list box in the form called
"PoolCommitSelection"
Can anybody tell me what exactly this error means and how to get around it?
it works, but only if there is one item selected. With more than one item, I
get "Error 2001 - You canceled the previous operation" when I try to run the
query. I'm using Access 2000.
Public Function PoolsCrit()
Dim PoolChos As Variant, Pools As String
For Each PoolChos In
Forms![PoolCommitSelection]![PoolSelector].ItemsSelected()
If Len(Pools) <> 0 Then Pools = Pools & " Or "
Pools = Pools & Forms![PoolCommitSelection]![PoolSelector].Column(0,
PoolChos)
Next PoolChos
PoolsCrit = Pools
End Function
"PoolSelector" is the name of the simple list box in the form called
"PoolCommitSelection"
Can anybody tell me what exactly this error means and how to get around it?