My Multi selection is working fine, but my SQL is not working with the selection.
can someone check the code and tell me what went wrong?
ragu![[pc] [pc] [pc]](/data/assets/smilies/pc.gif)
Code:
[red]mySQL[/red]
SELECT Assets.AssetID, Assets.Model, Assets.Asset_Cat_Code
FROM Assets
WHERE (((Assets.Asset_Cat_Code) In ([forms].[Report].[Text28])));
[blue]------------------------------------------------------[/blue]
[red]My Code to Select Multi items[/red]
Private Sub List20_AfterUpdate()
Dim varItem As Variant
Dim txtTemp As String
For Each varItem In Me.List20.ItemsSelected
txtTemp = txtTemp & "'" & Me.List20.ItemData(varItem) & "'" & " Or "
Next
If Len(txtTemp) > 0 Then
txtTemp = Left(txtTemp, Len(txtTemp) - 4)
End If
Me.Text28.Value = txtTemp
End Sub
can someone check the code and tell me what went wrong?
ragu
![[pc] [pc] [pc]](/data/assets/smilies/pc.gif)