Creating and using a search in a form.

soorags

Registered User.
Local time
Today, 09:19
Joined
Mar 19, 2007
Messages
37
On the "View Directory" form of my database I would like to allow the user to be able to fill in AT LEAST one piece of information on the company so that when he or she clicks on the "Submit Information for Search" command button, the table below shows the results that have been searched for with all company information.

For example if only the company name "HMC" was typed in, clicking on the "Submit information for search button" would display all of the searched results in the table below, showing companies with the name "HMC"

However if HMC was typed in with the companies address as well, and then searched for, only the specific result would be shown.

How is it possible to make this happen on my database?

I would like to find out very soon, thank you.

Gurdip Soora.
 

Attachments

A very simple method is:

Company like Forms![YourForm]![Company] & "*" and CompanyName like Forms![YourForm]![CompanyName] & "*"
 
RE:Company like...

Where do I type the "Company like ..." etc??
 
You design the Search around the fields from which the View Directory is derived. My naming conventions may not be correct but if you provide the fields that you want to be searched on I will be more explicit.

Simon
 
RE: Fields

On the View Directory form and in the UK Table, there are the fields:
Business Name
Business Type
Address
City
Country
Telephone Number
Website Address
Email Address
I would like it to be that at least one can be input to find relevant information from the UK Table to be displayed on the table at the bottom of the View Directory form. Just to make it clear. Do I type the code that Simon MT supplied
in the Query Criteria for Business Name? Just to make sure. I've tried many of these methods but they aren't working.

Gurdip Soora
 
Last edited:

Users who are viewing this thread

Back
Top Bottom