ListBox based on cbo value

C

Chris

Hello Group. I have a listbox based on a query. I would like the listbox
to display the results matching the value of the combo box. The combo box
is unbound.

User selects course ( access, excel, word ) list box displays all records of
employees levels of access.

I would also like a second combobox to filter the level of the course
(beginner, intermediate, advanced).
The query has the two primary keys - Course and CourseLevel.

I've tried this from within the after update property of the comboBox but it
didn't return anything.
strCourses = "SELECT qryEmployeesCourse.tblEmployees_EmployeeID,
qryEmployeesCourse.FirstName, qryEmployeesCourse.LastName,
qryEmployeesCourse.tblCourses.Course, qryEmployeesCourse.CourseLevel,
qryEmployeesCourse.tblCourse.Course,
qryEmployeesCourse.SubjectLevel, qryEmployeesCourse.DepartmentName,
qryEmployeesCourse.Manager" & _
"FROM qryEmployeesCourse;"
Me.lstCourseTest.RowSource = strCourses
Me.lstCourseTest.Requery
 
G

Guest

S

S Jackson

I thought I would give you an update since you were trying to help. I gave
up. My initial reason for trying all of this was because I think I have a
design flaw in my database. My central table is tblCaseInfo. It has a one
to many relationship with tblSurveyors. It also has a one-to-one
relationship with tblRegion. The information in tblRegion is the names and
addresses of program managers. There can be several program managers per
Region. Originally, I had my form set up with a combo box to select Region,
a 2nd combo box was populated based on the selection for Region with the
program managers in that Region - from tblRegion.

The design flaw I saw in my database was that the information about program
managers contained in tblRegion is also stored in tblSurveyors. So, when a
user wants to update information related to a program manager, they have to
update it in two different places. So, I thought I would try to change my
form by having the 2nd combo box populate with just program managers
(SvyTitle field in tblSurveyors). The first problem was the empty combo box
when you newly opened the form, or changed the Region selection in another
record. The second problem was it did not update the txtboxes for name,
title, phone number of the program manager.

I am not sure how to fix this. Do you think I am having a problem because
tblCaseinfo has a one-to-many relationship with tblSurveyors? BTW, there is
a link table called tblCaseSurveyors. When I select Surveyors assigned to a
case (a record in tblCaseinfo), it creates a record in tblCaseSurveyors.
Maybe I need a link table for program managers?.

I'm so confused. I can't imagine how confusing this must be to you!
Therefore, I give up.

Thanks anyway
 
S

S Jackson

Please disregard my post, I didn't mean to reply to this thread.

(DB design makes you crazy!)
 

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