Begins with or Starts With option???

jk8721

New member
Local time
Today, 04:15
Joined
Aug 27, 2003
Messages
6
I've got a Dialog form that runs a Macro that pulls up a tabular form based upon the user input in the dialog form. I use the Where condition to bring up only records that match the Input Text. The Where condition looks like this, [LastName] Like [Forms]![SearchByDialog]![SearchByLastNameText].

The only problem is that you have to type in the full name or the first letter and an *. I would like the user to be able to just enter the first few letters of the field (in this case [LastName]) and find all corresponding fields. I guess assume that the * is always there. Thanks for any help.

Jeff
 
Jeff,

[LastName] Like "*" & [Forms]![SearchByDialog]![SearchByLastNameText] & "*"

Wayne
 
Thanks, I'm so very close but...

Thanks so much for your help. I'm so close I can taste it. The only problem is that it's pulling up all records with a letter in it no matter where that letter is in the last name. For example, if the user types in C it will not only return all last names that start with C (which is great) but it will also turn up last names like Buclkey or Rickett, anyone with a C in their last name. Thanks again.

Jeff
 
Thanks I Figured it out.

Thanks so much, I could not have done it on my own. I took out the fist "*" & and left the one after the text box name. It works great. Geese I was up all night trying to figure that out before I posted the message. Thank you for your help.

Jeff
 

Users who are viewing this thread

Back
Top Bottom