Query Search

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Im trying to use the Criteria Field for the Query so i can find a record but I have several companies that have differnt locations for example

Archtech Dallas
Archtech Miami
Groundvette New York
Groundvette Las Vegas

they have differnt company ID's because they are at differnt address at the moment im using the following code in the Criteria field to search for a company

[Forms]![Labels]![Company Name]

But if i want it to bring up a comany i have to type "Archtech Dallas" to bring that company info up. But how do you setup it up to say find everything with just "A" or "Arch" incase you dont know how to spell it.
 
The following will find everything that begins with what is in the Company
Name textbox:
Like [Forms]![Labels]![Company Name] & "*"

This will find everything that contains what is in the Company Name textbox:
Like "*" & [Forms]![Labels]![Company Name] & "*"

This will find everything that ends with what is in the Company Name
textbox:
Like "*" & [Forms]![Labels]![Company Name]


--

Ken Snell
<MS ACCESS MVP>

Larry said:
Im trying to use the Criteria Field for the Query so i can find a record
but I have several companies that have differnt locations for example
Archtech Dallas
Archtech Miami
Groundvette New York
Groundvette Las Vegas

they have differnt company ID's because they are at differnt address at
the moment im using the following code in the Criteria field to search for a
company
[Forms]![Labels]![Company Name]

But if i want it to bring up a comany i have to type "Archtech Dallas" to
bring that company info up. But how do you setup it up to say find
everything with just "A" or "Arch" incase you dont know how to spell it.
 
Hi Larry,

Try [Please enter the company name.] & "*"

HTH
--
-Larry-
--

Larry said:
Im trying to use the Criteria Field for the Query so i can find a record
but I have several companies that have differnt locations for example
Archtech Dallas
Archtech Miami
Groundvette New York
Groundvette Las Vegas

they have differnt company ID's because they are at differnt address at
the moment im using the following code in the Criteria field to search for a
company
[Forms]![Labels]![Company Name]

But if i want it to bring up a comany i have to type "Archtech Dallas" to
bring that company info up. But how do you setup it up to say find
everything with just "A" or "Arch" incase you dont know how to spell it.
 
Back
Top