problem searching name using sql

ekses90

New member
Local time
Today, 22:00
Joined
Jan 24, 2011
Messages
5
i want to search name that have keyword from another form.
for example if i key in "nad", it will display all name that have "nad" in their name.

i try this but it will display name with exactly "nad".

SELECT *
FROM supplier
WHERE (((supplier.company_nm) Like Forms![search]!company_nm));

can anyone help me?:(
 
Code:
SELECT *
FROM supplier
WHERE (((supplier.company_nm) Like [COLOR=red]"*" &[/COLOR] Forms![search]!company_nm & [COLOR=red]"*"[/COLOR]))

Just add wildcard before and after.

JR
 
thank you so much..i try it and it work.
i'm a beginner.thank you for your help.
 

Users who are viewing this thread

Back
Top Bottom