-
VB,Access DB
Hi All,
I posted my question before.But i want to make sure i am posting again same question.
I want to filter the table that start letter with "T"(Both cases).Below is the query i used in VB.
strSQL = "SELECT * FROM SubCont WHERE Sub_Cont_Name LIKE '" & "T" & "*'"
I tested in my Access Query it giving results.
But when i used in VB,I am getting the recordset.EOF = true.
So what is the option i have to use to get the correct recordset.
Thanks,
CM
-
Re: VB,Access DB
Try % instead of *
strSQL = "SELECT * FROM SubCont WHERE Sub_Cont_Name LIKE '" & "T" & "%'"
Iouri Boutchkine
[email protected]
-
Re: VB,Access DB
You could try this.
strSQL = "SELECT * FROM SubCont WHERE Sub_Cont_Name LIKE 'T%'"
-
Re: VB,Access DB
You can also try the below:-
strSQL = "SELECT * FROM SubCont WHERE Left(Sub_Cont_Name,1) = 'T'"