Solved

Form for retrieving related records

Posted on 2014-11-28
4
110 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This very simple solution applies to a narrow cross-section of the "needs to close" variety. In this case, the full message in Event Viewer was in applog, Event ID 1000: Faulting application iexplore.exe, version 8.0.6001.18702, faulting module …
This collection of functions covers all the normal rounding methods of just about any numeric value.
Viewers will learn how to maximize accessibility options in an Excel workbook for users with accessibility issues.
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 …

860 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