querry - choosing selection

  • Thread starter Viktor via AccessMonster.com
  • Start date
V

Viktor via AccessMonster.com

I have the following query:

SELECT Students.stdFirst, Students.stdLast, Courses.crsName
FROM Students INNER JOIN (Courses INNER JOIN CoursesTaken ON Courses.crsID =
CoursesTaken.crstkCourseID) ON Students.stdID = CoursesTaken.crstkStudentID
WHERE (((Courses.crsName)=[]));

Obviously, when I run the querry, first I get an input box where I should
specify the name of the course. Is it possible to change this input box with
a combobox that would show the available courses?

Thanks,
Viktor
 
J

John Spencer

Check out this article for a detailed discussion.
http://www.fontstuff.com/access/acctut08.htm

Or check out this from MS
http://office.microsoft.com/en-us/access/HA011730581033.aspx

A brief quote from a John Vinson (Access MVP) posting.

You'll need to create a small unbound Form (let's call it frmCriteria) with
a Combo Box control (cboCrit) on it. Use the combo box wizard to select the
table for the selections, and be
sure that the bound field of the combo is the value you want to use as a
criterion. Save this form.

Now use

=[Forms]![frmCriteria]![cboCrit]

as the criterion in your Query.

It's convenient to base a second Form or Report on the resulting query to
display the results; if you put a button on frmCriteria to launch that form
or report, the user can enter the criterion and view the results in one
simple operation!

Quoting John Vinson

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Top