rolodex

A

Annemarie

I'm trying to create a rolodex contact list. I want to search by first name,
last name, center location, and department. I want either a drop-down with
A-Z or 26 buttons A-Z, whichever is easier.

My table name is contact_list. The field names in the table are:
department, first_name, last_name, title, phone_extension, email_address,
and id(primary key).

Can you describe in general what I need to do to get this to work?
Thanks
 
B

BobT

Hopefully you have some Access experience to fill in the details, but in
general:

1. Create a form.
2. Add the drop down (a.k.a. combo box) to the form with the 26 letters of
the alphabet.
3. Add an option group with your search types (e.g. first, last, centre,
etc.).
4. Create queries for each type. For example

SELECT *
FROM CONTACT_LIST
WHERE [FIRST_NAME] LIKE frmSearch.cmbLetter.Value & "*"

I may not have the WHERE clause perfect (not at a system with Access on it
to test) but basically it would return the list of contacts where their first
names start with the letter they selected. Make another 3 or 4 queries that
query the other fields (last, centre, etc.).

5. Add to your form 4 sub-forms that uses the results from the queries.
6. Add a button that fires the appropriate query and displays the
appropriate sub-form (and hides the other sub-forms).
 
A

Annemarie

Ok, I understand how to built the query itself, but I can't seem to get my
combo box to use the query and filter my subform. How do I properly link my
combo box to the query i made (named "test" to try to figure it out)

combo box name is Combo0

BobT said:
Hopefully you have some Access experience to fill in the details, but in
general:

1. Create a form.
2. Add the drop down (a.k.a. combo box) to the form with the 26 letters of
the alphabet.
3. Add an option group with your search types (e.g. first, last, centre,
etc.).
4. Create queries for each type. For example

SELECT *
FROM CONTACT_LIST
WHERE [FIRST_NAME] LIKE frmSearch.cmbLetter.Value & "*"

I may not have the WHERE clause perfect (not at a system with Access on it
to test) but basically it would return the list of contacts where their first
names start with the letter they selected. Make another 3 or 4 queries that
query the other fields (last, centre, etc.).

5. Add to your form 4 sub-forms that uses the results from the queries.
6. Add a button that fires the appropriate query and displays the
appropriate sub-form (and hides the other sub-forms).

Annemarie said:
I'm trying to create a rolodex contact list. I want to search by first name,
last name, center location, and department. I want either a drop-down with
A-Z or 26 buttons A-Z, whichever is easier.

My table name is contact_list. The field names in the table are:
department, first_name, last_name, title, phone_extension, email_address,
and id(primary key).

Can you describe in general what I need to do to get this to work?
Thanks
 

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