E
el zorro
I have an Access adp front end connected to SQL Server back end. I have a
form that pops up when the user types a person's last name. It shows all
people in our database with that last name. So far so good.
I want to make it easier on our users though, and not require that they
spell the whole name correctly, or even have to key inthe whole name. I would
like to have them just type the first 3 letters, and get all last names tha
begin with those letters. Form that list, they can easily find the person
they want.
So I tried this in the VBA statement that is executed when the control
button is clicked:
stLinkCriteria = "Lname Like'" & Left(Me![Last name field on form], 3) & "*' "
DoCmd.OpenForm stDocName, acFormDS, , stLinkCriteria, acFormReadOnly
It doesn't work-- it doesn't crash, it just returns zero records. I must
have the syntax wrong. Cah anyone help? Thanks mucho!
form that pops up when the user types a person's last name. It shows all
people in our database with that last name. So far so good.
I want to make it easier on our users though, and not require that they
spell the whole name correctly, or even have to key inthe whole name. I would
like to have them just type the first 3 letters, and get all last names tha
begin with those letters. Form that list, they can easily find the person
they want.
So I tried this in the VBA statement that is executed when the control
button is clicked:
stLinkCriteria = "Lname Like'" & Left(Me![Last name field on form], 3) & "*' "
DoCmd.OpenForm stDocName, acFormDS, , stLinkCriteria, acFormReadOnly
It doesn't work-- it doesn't crash, it just returns zero records. I must
have the syntax wrong. Cah anyone help? Thanks mucho!