Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can I filter a query based on a form control ? 1

Status
Not open for further replies.

lsantos

Programmer
Jun 9, 2003
24
AU
Hello,

I have an access form to enrol people in courses. In the main form I select a course, date, etc (table courses).

Further down the form I have tab A with a subform/grid where I enrol people (into table participants) using a combo box based on the people table.

Once people complete a course they may attain a license/ticket, therefore in my tab B I want to enter license/ticket details but only to users enrolled for that course.

In tab B my people combo box is based on the table participants but I'm getting all participants in all courses where I only want to get the ones enrolled in that course.

Is there a way to restrict the query participants to the course being displayed in the form ? can I filter the query based on a form control in this case course?

Any hints appreciated.
-luis
 
Yes, you can. For example:


[tt]RowSource: Select Participants.Sname, Participants.FName From Participants Where CourseID=Forms!Courses!CourseID[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top