Select Query Access 2003 listing by initial

B

BigAl

I would have thought that this would be simple but I'm at a loss as to how
to do this (perhaps it's me that simple!)

Anyway.

Select parameter query to allow the user to specify the initial of a company
so that all company's with that initial get listed.

Field name is Company_Name and the criteria is set to [Enter Company
Initial] but I can't for the life of me work out how to set the wildcard
extension.

Any help/advice gratefully received.

BigAl
 
F

fredg

I would have thought that this would be simple but I'm at a loss as to how
to do this (perhaps it's me that simple!)

Anyway.

Select parameter query to allow the user to specify the initial of a company
so that all company's with that initial get listed.

Field name is Company_Name and the criteria is set to [Enter Company
Initial] but I can't for the life of me work out how to set the wildcard
extension.

Any help/advice gratefully received.

BigAl

To return records that BEGIN with the entered letter(s), set the
[Company_Name] criteria to:
Like [Enter Company Initial] & "*"

To return records that END with the entered letter(s), set the
criteria to:
Like "*" & [Enter Company Initial]

To return records that have the entered letter(s) anywhere in the
field, set the criteria to:
Like "*" & [Enter Company Initial] & "*"

The more letters you enter, the more narrowly are the records
filtered.

Look up the Like operator in Microsoft Jet SQL Reference + Overview +
Using Wildcard Characters in String Comparisons + Like Operator
 
J

John W. Vinson

I would have thought that this would be simple but I'm at a loss as to how
to do this (perhaps it's me that simple!)

Anyway.

Select parameter query to allow the user to specify the initial of a company
so that all company's with that initial get listed.

Field name is Company_Name and the criteria is set to [Enter Company
Initial] but I can't for the life of me work out how to set the wildcard
extension.

Any help/advice gratefully received.

BigAl

LIKE [Enter Company Initial] & "*"

will find everything from AAAA Advertising through Azathoth Productions if the
user type A in responst to the prompt.
 
B

BigAl

fredg said:
I would have thought that this would be simple but I'm at a loss as to
how
to do this (perhaps it's me that simple!)

Anyway.

Select parameter query to allow the user to specify the initial of a
company
so that all company's with that initial get listed.

Field name is Company_Name and the criteria is set to [Enter Company
Initial] but I can't for the life of me work out how to set the wildcard
extension.

Any help/advice gratefully received.

BigAl

To return records that BEGIN with the entered letter(s), set the
[Company_Name] criteria to:
Like [Enter Company Initial] & "*"

To return records that END with the entered letter(s), set the
criteria to:
Like "*" & [Enter Company Initial]

To return records that have the entered letter(s) anywhere in the
field, set the criteria to:
Like "*" & [Enter Company Initial] & "*"

The more letters you enter, the more narrowly are the records
filtered.

Look up the Like operator in Microsoft Jet SQL Reference + Overview +
Using Wildcard Characters in String Comparisons + Like Operator


Cheers Fred, exactly what I was after and the "Like" command exactly what I
had forgotten. Back to writing a database after a 6 year lay off and I think
it shows!

Thanks again.

BigAl
 

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