Solved

Form for retrieving related records

Posted on 2014-11-28
4
113 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

User Beware!  This is a rather permanent solution to removing your email from an exchange server.  The only way to truly go back is to have your exchange administrator restore your mailbox from backups.  This is usually the option of last resort.  A…
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.
Viewers will learn the different options available in the Backstage view in Excel 2013.

696 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