hi,
i have a ms access table with
i have a ms access table with
Code:
field containing the following values:
D1, D3, D5, D6, D7, W1, W2, HP-D1, HP-D2, G-TSE, G-TSD, G-ASE, G-ASD, G-ASV
here is a part of my code:
Dim selGable As String
...
selGable = Left(rs3("Type"), 3)
rs2.Filter = "Code LIKE 'D*' OR Code LIKE 'W*' OR Code LIKE 'H*' OR Code LIKE '*" & selGable & "'"
Set DataGrid1.DataSource = rs2
i want to filter my recordset so it will show all records with [Code] beginning D,W, H and only G-TSE or G-TSD or G-ASE or G-ASD or G-ASV.
right now it shows all records regarding of the selGable value.
this part of code:
rs2.Filter = "Code LIKE 'D*' OR Code LIKE 'W*' OR Code LIKE 'H*'"
works OK, but if i add:
or Code LIKE '*" & selGable & "'
it doesn't.
any idea, please?