passing parameters between combo boxes access 2007

D

didi

Hey guys,

I'm new to all of this but i desparately need some help! I am
producing a database for my dissertation and need to now how to pass a
value from one combo box in as a parameter for the query in the next
combo box in the same form. So basically what i want it to do is take
in the student ID that is selcted from the first combo box by the user
and then pass that ID to bring back in another combo box the courses
that they are associated with. The course ID i am then planning to
use as a parameter for feedback topics to be brought back. So as you
can see it all relies on being able to pass these parameters so if
anyone could help it would be so gratefully appreciated. i am doing
this in Access 2007 if that helps at all.

Didi
 
M

mray29

You can write a query to be used as the data source for the second combo box
that filters data depending upon what was selected in the first box. The key
is the where clause in the query:
SELECT CourseID, Course
FROM Couses
WHERE StudentID = [Forms]![frmTest]![combo1]));

assuming Combo1 is the first combo box.
In the After Update event of the first box, use
Me.Combo2.Requery so it requeries data for the second combo box.
 

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