Advanced Query Coding.....

G

Guest

Hello All,
My problem is that i have created a query which asks the user for a company
name so it can search records to display other information on the company
name they have entered. My problem is that even if the user enters just part
of the company name, the result is blank. I want the query to show the
companys information even if teh user only enters part of the companys name.
For example if the company name is 'Niceday ltd' and the user just enters
'niceday' i would like the niceday ltd record to show up in the result.

At the moment the code i have in the criteria section of company name is :
[Please enter company name]

The table i am accessing information is from 'customer' table. Companyname
is the field i am referencing from the customer table to match the users
input. What would i have to do to make my query accept even part of the
company name to show results of the desired company.

All help would be great :)
 
J

jahoobob via AccessMonster.com

Try:
Like "*" & [Please enter company name] & "*"
in the criteria.

Hello All,
My problem is that i have created a query which asks the user for a company
name so it can search records to display other information on the company
name they have entered. My problem is that even if the user enters just part
of the company name, the result is blank. I want the query to show the
companys information even if teh user only enters part of the companys name.
For example if the company name is 'Niceday ltd' and the user just enters
'niceday' i would like the niceday ltd record to show up in the result.

At the moment the code i have in the criteria section of company name is :
[Please enter company name]

The table i am accessing information is from 'customer' table. Companyname
is the field i am referencing from the customer table to match the users
input. What would i have to do to make my query accept even part of the
company name to show results of the desired company.

All help would be great :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top