Query MS Access

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • and111
    New Member
    • Aug 2012
    • 12

    Query MS Access

    Hi,

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

    Thank you in advance.
  • twinnyfo
    Recognized Expert Moderator Specialist
    • Nov 2011
    • 3662

    #2
    Query the classes table, and group by the instructor.

    Comment

    • Seth Schrock
      Recognized Expert Specialist
      • Dec 2010
      • 2965

      #3
      The SQL would look something like this depending on which fields you wanted to pull:

      Code:
      SELECT ClassID, 
      ClassName,
      Instructor
      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).

      Comment

      • and111
        New Member
        • Aug 2012
        • 12

        #4
        Thanks, is there any way to show a specific instructor in the query instead of grouping them

        Comment

        • and111
          New Member
          • Aug 2012
          • 12

          #5
          Hi, thanks Seth but it needs to be a query

          Comment

          • twinnyfo
            Recognized Expert Moderator Specialist
            • Nov 2011
            • 3662

            #6
            Code:
            WHERE Instructor = '" & InstructorName & "'"
            inserted after your FROM clause

            Comment

            • twinnyfo
              Recognized Expert Moderator Specialist
              • Nov 2011
              • 3662

              #7
              This is standard Structured Query Language.......

              Comment

              • and111
                New Member
                • Aug 2012
                • 12

                #8
                Ok, once again thanks both of you for your help

                Comment

                Working...