combobox value depends on other combobox

A

Associates

Hi,

I have a form called AddStudentForm in Access database. It has comboboxes in
it. There are two particular comboboxes i'm having troubled with.

Combobox 1 : Department
Combobox 2 : Course

Now, the dropdown value of Course depends on the value from the Department.
For example,

Courses available for Department "Engineering" are
01 - Electrical Engineering
02 - Electronic Engineering
03 - Mechanincal Engineering
and so on

So, when user selects Engineering from the combobox 1, combobox 2 for course
should have those engineering related entries in the dropdown list.

However, the problem here is let's say i select Engineering for the
department and then select Electronic Engineering for course. And when I
checked the value of the combobox 2 before inserting the entry into the
database table, it was 53. This is the wrong id for the course. It should
have been 02 rather than 53. Not sure if this is to do with the way i set it
up.

In the row source of the combobox 2, i said DepartmentID for course = Like
[CB_Department] in the SQL Statement query builder.

How do i fix this?

Your help would be greatly appreciated.

Thank you in advance
 

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