Results 1 to 3 of 3
  1. #1
    Daryl2106 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    167

    Query linked to form

    Hi Everyone,



    I am a new user. I have a form linked to a query, that allows me to enter a teachers name from a combo box, and then I have a button that runs an embedded macro to run the query.

    The data I am trying to selct is contained in three linked tables. The first has the instructor information that includes the courses the teach. The second is a student enrollment table (the two are linked by a course number) and the third has the students contact info including name which is linked to the enrollment table by student number.

    The criteria I am using is [Forms]![TeachersEnrollmentQuery]![InstructorName].

    I am just not getting any records in my query.

    Any help is greatly appreciated.

    Thanks and take care,

    Daryl

  2. #2
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    Here's a tutorial on cascading combo boxes.

    http://www.fontstuff.com/access/acctut10.htm

    Alan

  3. #3
    Daryl2106 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    167

    Still having troubles

    Hi,

    Thanks for the reply. I am still having troubles getting my query to return the desired records. Here is the SQL I am using in the query:

    SELECT CourseInventory.Instructor
    FROM CourseInventory
    WHERE (((CourseInventory.Instructor)=[Forms]![TeachersEnrollmentQuery]![InstructorName])) OR (((IsNull([Forms]![TeachersEnrollmentQuery]![InstructorName]))<>False));

    The Instructor Name on the form (TeachersEnrollmentQuery - not the best name!) is selected from a combo box that chooses from a Instructor table. The query is run from a button on a form containing an "OpenQuery" embedded macro.

    Sometimes I get a single digit in the "Instructor" column (only column shown) but most times I get nothing.

    Thnaks for your help.

    Take care,

    Daryl

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Query criteria in linked table
    By kjlogue in forum Queries
    Replies: 2
    Last Post: 10-06-2011, 11:56 AM
  2. Query using a table linked to 2 others
    By dave_p in forum Queries
    Replies: 8
    Last Post: 07-25-2011, 10:04 AM
  3. Query for temp linked table
    By compooper in forum Programming
    Replies: 8
    Last Post: 06-30-2011, 06:53 AM
  4. Linked table Query based form
    By sesproul in forum Forms
    Replies: 1
    Last Post: 01-21-2010, 08:46 PM
  5. Query on a linked table?
    By SilverSN95 in forum Queries
    Replies: 1
    Last Post: 09-26-2009, 03:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums