Solved

Form for retrieving related records

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Problem: You created a new custom form in Outlook for your contacts (added fields, deleted fields, changed the layout of fields, whatever) and made it the default form for contacts. The good news is that all new contacts will utilize the new form. T…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
Viewers will learn how to maximize accessibility options in an Excel workbook for users with accessibility issues.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

776 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