Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you Create new Query from VBA 1

Status
Not open for further replies.

Olddogg

IS-IT--Management
Nov 22, 2004
9
CA
I am trying to filter from a last name field.
What I am looking for is to be able to type in: "sm"

and the records that will come up will include:

- smith
- smythe
- smithers

etc.....

I am trying to use the wildcard : * in VBA but it doesn't seem to be working. Does anybody have any pointers?

Currently I am using the DoCmd.OpenForm (then filtering)
However I am only able to type Smith... for all the Smith entries... if I enter Sm... nothing will happen

Thanks
Jon

 
Take a look at the Like operator:
[last name] Like 'sm*'

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thank you so much PH!

Works like a Charm!

Jon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top