Solved

Form for retrieving related records

Posted on 2014-11-28
4
103 Views
Last Modified: 2014-11-28
I created a database to manage my students.  I created a query from this table as a lookup for the students' names, which also retrieves the Student ID.  I have a separate table for tracking attendance.  This table includes the student ID and date/time of the class only.  I'd like to create a form that:

has a drop-down box to select the student
then, using the student, ID, shows (in a subform) all of the classes that student has attended.
0
Comment
Question by:BBlu
  • 2
  • 2
4 Comments
 
LVL 7

Accepted Solution

by:
Camillia earned 500 total points
ID: 40471284
1, Bind your first query to a dropdownlist.
2. Have selectedindexchanged event on the dropdown with Autopostback set to true. For example,called xyz
3. Pass the Student Id to the event in #2. Query the database (you have the attendance table) and bring back the data.
4. Bind the data to a listview or gridview

I'm assuming you're using Web Forms (ASP.Net)
0
 

Author Comment

by:BBlu
ID: 40471286
I'm using MS Access (desktop).
0
 
LVL 7

Expert Comment

by:Camillia
ID: 40471291
That's the database. What will you use to develop the application/front end/website?
0
 

Author Comment

by:BBlu
ID: 40471293
I was able to get it to work.  Thanks, Camilla.  
Here's what  I did:
I created a blank form, then added a combo box that the row source as the student table.  I then used the Insert SubForm query wizard to add a box for the attendance.  It automatically asked which field linked the two.  Thanks, again.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Many companies are making the switch from Microsoft to Google Apps (https://www.google.com/work/apps/business/). Use this article to learn more about what Google Apps has to offer and to help if you’re planning on migrating to Google Apps. It is …
The System Center Operations Manager 2012, known as SCOM, is a part of the Microsoft system center product that provides the user with infrastructure monitoring and application performance monitoring. SCOM monitors:   Windows or UNIX/LinuxNetwo…
Viewers will learn the different options available in the Backstage view in Excel 2013.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now