Hi

I am trying to find customers name that starts with "S" in my access database. If i run the following query in access its working fine.

Select Lastname from employees where Firstname Like '*S*';

it displays two records which is right.

if I use it in access it..its not working. Any idea why?

All other queries are working in VB. like if I use Firstname equals "Sam" but it doesn't work when I use Firstname Like '*S*'

Please Help

Replace * with %

Also, if you want something that starts with S, do not put a wildcard before it. That will match Sam, aSm, amS, etc.

>if I use it in access it..its not working. Any idea why?

Select Lastname from employees where Firstname Like '%S%';

Replace * with %

Also, if you want something that starts with S, do not put a wildcard before it. That will match Sam, aSm, amS, etc.

I knew It was % but i tried using it in access and it didn't work. So i thought it should be *.

thank you so much. it worked.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.