By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,662 Members | 1,765 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,662 IT Pros & Developers. It's quick & easy.

Query MS Access

P: 12

How would I create a query to find the list of classes a particular instructor must attend?

Thank you in advance.
Aug 10 '12 #1
Share this Question
Share on Google+
7 Replies

Expert Mod 2.5K+
P: 3,127
Query the classes table, and group by the instructor.
Aug 10 '12 #2

Seth Schrock
Expert 2.5K+
P: 2,931
The SQL would look something like this depending on which fields you wanted to pull:

Expand|Select|Wrap|Line Numbers
  1. SELECT ClassID, 
  2. ClassName,
  3. Instructor
  4. FROM tblClasses
You can create a form in datasheet view and use that as a subform on your instructors form using the Instructor field as the Master/Child link. You can also create a combo box that lists each of the instructors and then once you select the instructor, a report can be opened to list the classes that the instructor you selected needs to teach (I can give more detailed instructions for this method if you desire).
Aug 10 '12 #3

P: 12
Thanks, is there any way to show a specific instructor in the query instead of grouping them
Aug 10 '12 #4

P: 12
Hi, thanks Seth but it needs to be a query
Aug 10 '12 #5

Expert Mod 2.5K+
P: 3,127
Expand|Select|Wrap|Line Numbers
  1. WHERE Instructor = '" & InstructorName & "'"
inserted after your FROM clause
Aug 10 '12 #6

Expert Mod 2.5K+
P: 3,127
This is standard Structured Query Language.......
Aug 10 '12 #7

P: 12
Ok, once again thanks both of you for your help
Aug 10 '12 #8

Post your reply

Sign in to post your reply or Sign up for a free account.