Solved

Using a list to pull a parameter

Posted on 2014-04-29
6
52 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 34

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
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

 

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
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…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
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…

706 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

19 Experts available now in Live!

Get 1:1 Help Now