paramater question

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

Guest

I have a query where I want to be able to run and a box will pop up and ask
me to Enter Letter and when I type a letter it will bring back all records
that begin with that letter. (Employee records) I have on the last name
criteria:
[Enter Letter] this will bring me the window that says Enter Name, I am lost
now because I tried [Enter Letter] "Like *" but this doesn't bring back
anything.
What do I type after the Enter Name to be able to put in a beginning letter.
thanks,
 
Hi Pammy,

Reference the same field using Like. For instance, if the table is tblClass,
and the field is Class, in the Criteria for that field, you would use the
following criteria for the Class field:

Like [Me].[Class] & "*"
 
In the criteria row of the last name column in query design view put:

Like [Enter Letter] & "*"

For a fancier way of doing this sort of thing take a look at the Customer
Phone List form in the sample Northwind database. This has an option group
of toggle buttons at the bottom of the form which calls the Customer phone
List macro to filter the form. In your case you could base the form on your
query, without the parameter, and copy and paste the option group from the
form in Northwind, along with the macro, in which you should only have to
amend the references to the Company Name control name to the name of your own
Last Name control.

Personally I'd have done it in code rather than use a macro, but the latter
does the job perfectly well.

Ken Sheridan
Stafford, England
 
Back
Top