works but dunno how... can someone explain it to me
I found following code on the forum
It works great and I can change it for my needs BUT
I cant figure out how and why its working
Can someone lecture me?
Dim Criteria As String
Dim ctl As Control
Dim Itm As Variant
Dim stDocName As String
' Build a list of the selections.
Set ctl = Me![LeaList]
For Each Itm In ctl.ItemsSelected
If Len(Criteria) = 0 Then
Criteria = Chr(34) & ctl.ItemData(Itm) & Chr(34)
Else
Criteria = Criteria & "," & Chr(34) & ctl.ItemData(Itm) _
& Chr(34)
End If
Next Itm
thanks in advance
Al
I found following code on the forum
It works great and I can change it for my needs BUT
I cant figure out how and why its working
Can someone lecture me?
Dim Criteria As String
Dim ctl As Control
Dim Itm As Variant
Dim stDocName As String
' Build a list of the selections.
Set ctl = Me![LeaList]
For Each Itm In ctl.ItemsSelected
If Len(Criteria) = 0 Then
Criteria = Chr(34) & ctl.ItemData(Itm) & Chr(34)
Else
Criteria = Criteria & "," & Chr(34) & ctl.ItemData(Itm) _
& Chr(34)
End If
Next Itm
thanks in advance
Al