Results 1 to 4 of 4
  1. #1
    crustycrab101 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2011
    Posts
    2

    combo box based subform and query help required!!

    I am having a little trouble with my database for my studio, i have three tables and what i am trying to do is create a form in which i have a combo box and a sub form. in the combo box it contains all the class in which the studio teaches and when the class is clicked on in the combo box the sub form will display all the students within those classes.



    This database is constructed up of three tables,
    1) StudentTable: StudentID, FirstName, Surname, Address, DOB, PhoneNumber
    2) ClassTable: ClassID, ClassName, Day, Time
    3) SignInTable: SignInID, CLassID, StudentID week 1, week2 week3

    (the week in the sign in table are the where payment amounts would be placed)

    I have also created a Query in which is meant to power the subform. so when the class fromt he drop down box is selected all the setudents in the class plus all the payments(week 1, week 2 week 3, etc.) are displayed in the sub form.

    the SQL for the query is:

    "SELECT [Student Table].Surname, [Student Table].Firstname, [Sign in].[Week 1], [Sign in].[Week 2], [Sign in].[Week 3], [Sign in].[Week 4], [Sign in].[Week 5], [Sign in].[Week 6]
    FROM [Student Table] INNER JOIN (ClassTable INNER JOIN [Sign in] ON ClassTable.ID = [Sign in].[Class ID]) ON [Student Table].[Student Number] = [Sign in].[Student ID]
    WHERE (((ClassTable.[Class name])=[forms]![Form1]![Combo0]![AfterUpdate]));"

    Any help will be greatly appretiated

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2007
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    What is the trouble - error message, wrong results, nothing happens?

  3. #3
    crustycrab101 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2011
    Posts
    2
    well i have got it working, but the subform is not refreshing whenever the combo box changes.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2007
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Probably need a Requery or Refresh command. Like:
    Me.subformContainerName.Form.Requery

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

Similar Threads

  1. Subform Combobox based on Main form combo box
    By accessmom in forum Forms
    Replies: 5
    Last Post: 02-21-2011, 07:02 AM
  2. Replies: 5
    Last Post: 01-02-2011, 10:09 AM
  3. Running a query based on 2 combo boxes.
    By blessoni in forum Queries
    Replies: 4
    Last Post: 12-12-2010, 02:09 PM
  4. Updating subform based on combo box change
    By kev921hs in forum Forms
    Replies: 3
    Last Post: 04-01-2010, 08:43 AM
  5. Replies: 6
    Last Post: 06-03-2009, 02:01 PM

Tags for this Thread

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