Using the Like operator with a perameter query

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

Guest

Using Like "A*" will find all agents names starting with "A"....Is it
possible to use "Like" with brackets to have the user decide what letter they
want to start with? For instance is there a way for me to run a query and
get all instances that Alex and Andy worked a service call without having to
open the design view and change it everytime?
 
Yes, like this ---
Like [Enter start of search] & "*"

To find something that might be in the middle of field use this ---
Like "*" & [Enter search] & "*"
 
RaFranklin said:
Using Like "A*" will find all agents names starting with "A"....Is it
possible to use "Like" with brackets to have the user decide what letter they
want to start with? For instance is there a way for me to run a query and
get all instances that Alex and Andy worked a service call without having to
open the design view and change it everytime?


That is a really crude approach, but can do it using:

Like [Enter first letter] & "*"

It would be better to use a form with a text box for users
to enter the letter (or first few letters) of the name to be
displayed. This approach would use a criteria loke:

Like Forms!formname.textboxname & "*"
 
Back
Top