Solved

Using a list to pull a parameter

Posted on 2014-04-29
6
54 Views
Last Modified: 2014-11-28
I have two tables: T_Students, T_Times (date/time)
I have another table that is created from those two, called T_Attendance

I'd like to be able to use a query to create a mailing list for students that attended a specific class.  Because the time field is a date/time field, it's hard to prompt the user for that parameter.

Is there a way to have a drop down list appear to select the date/time and use it as the parameter for the query?
0
Comment
Question by:BBlu
6 Comments
 
LVL 35

Expert Comment

by:Bembi
ID: 40030404
Access provides a calendar control, which can be placed on a form and you can use the value property to buidl your query.....
Is this wht you asked for?
Means you build a form to give the user the possiblility to limit the results....
0
 

Author Comment

by:BBlu
ID: 40030409
Thanks, Bembi.  I want to be able to access this through a mail (email actually) merge, though.  I don't think I can do that with a form, right?
0
 
LVL 35

Assisted Solution

by:PatHartman
PatHartman earned 200 total points
ID: 40030472
Rather than prompting, use a combo on a form which is probably how you are populating the field to begin with.

Prompting causes problems because it requires the user to enter values multiple times plus there is no way for you to validate them so you can't tell if the user entered an invalid value.  The user would be prompted the first time when he opened the report to preview and a second time if he printed it.
0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 

Author Comment

by:BBlu
ID: 40030946
I'll try that, PatHartman.  I'm not that strong in forms, but I'll give it a try.
0
 
LVL 1

Accepted Solution

by:
DexterFan earned 200 total points
ID: 40072314
You need a form with a combo box that is based on unique values for the dates in your T_Attendance table.  Then you create your query that includes the date field and use the builder wizard to create criteria that refers to the content of your combo box in your form.  The last requirement on your form is a command button that runs the query.
0
 

Author Closing Comment

by:BBlu
ID: 40471271
Thanks, guys.  Sorry for the delay in closing the question.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

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…
Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

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