?
Solved

Using a list to pull a parameter

Posted on 2014-04-29
6
Medium Priority
?
60 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
[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
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 38

Assisted Solution

by:PatHartman
PatHartman earned 800 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
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 …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

752 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