Find my vba
Private Sub Search_Click()
Dim VarItem As Variant
Dim Strsearch As String Dim Sql As String Dim ctrl As Control
Set ctrl = Me.LbobDriveType
If ctrl.ItemsSelected.Count > 0 Then
For Each VerItem In ctrl.ItemsSelected
Strsearch = Strsearch & ctrl.Column(VarItem)
Next VerItem
MsgBox (Strsearch)
Sql = "SELECT Database.[Record _ID], Database.PhysicalVIN, Database.LogicalVIN, Database.VERSION, Database.BODY_STYLE, Database.ENGINE_TYPES, Database.BODY_EXTERIOR_COLOR, Database.INDIA_OR_EXPORT, Database.DRIVE_TYPES, Database.TRANSMISSION_TYPES, Database.FUEL_TYPE, Database.MARKET, Database.MARKET_CATEGORY " _ & "FROM [Database] where DRIVE_TYPES in('" & Strsearch & "')"
MsgBox (Sql)
End If
Me.SbfRecord.Form.RecordSource = Sql Me.SbfRecord.Form.Requery
end sub
End If
somewhere... – Unhandled Exception