Filter by Last Name and First Name

G

Guest

Hello,

I'm creating my first database and one of the issues I'm having deals with a
form I have created. The form is simple, it has a combo box for last name, a
combo box for first name and a date field. This form should give someone the
ability to enter the information and then view a report based off of the
criteria entered. I have it working to where it displays the report with the
correct information. However, the combo box's list all last names and then
all first names. If someone is looking for information on "Sally Smith" they
would select "Smith" from the last name combo box and then "Sally" from the
first name combo box. They could however also select a "Bob Smith" who does
not exist. Is there a way that once the last name is selected, the user can
only select first names that match from the table that each is stored in?
I've tried to go into the filters however everything seems to be grayed out
for the form in design view.

Regards,
Bill
 
G

Guest

That is one way to do it, but normally names are in a single combo box and
are sorted into order last name then first name. When the user types the
first letter of the last name a prompt appears listing names beginning with
that letter. Access does this, you don't need any special code.
So I would rethink your 2 combo boxes and write a query to combine the first
and last name into a single field to be listed in a single combo box.

Dorian
 
G

Guest

That makes sense and I appreciate the help. I'm not sure how I would get a
query to combine the names into one box though. Would you be able to assist
with that?

Thanks again.
 

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