Solved

MS-Access Query

Posted on 2012-04-08
11
257 Views
Last Modified: 2012-05-14
Is it possible to set the field criteria of a  query to display a list to select from, when the query is called?
0
Comment
Question by:dibrandt
  • 4
  • 2
  • 2
  • +1
11 Comments
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Access MVP) earned 500 total points
ID: 37821697
Well, not really ... if you mean to prompt some kind of list, and the user picks an item.  You would need to do that on a Form, when the user makes a selection from a List or Combo box, then run the Query ... and the criteria in the query references the Form's list or combo box.

mx
0
 

Author Comment

by:dibrandt
ID: 37823621
Thanks,  
Not what I wanted to hear, but it's MS-Access!
0
 
LVL 9

Expert Comment

by:macarrillo1
ID: 37823964
Depending on how many options they have, you could alter your prompt.

Instead of

[Please Enter a Value:]

You could have a prompt like:

[Please Enter a valid value: (Option1, Option2, Option3, etc)]

In some older versions of MS Access you could even use ^J (control J) for a new line. So the above could be displayed on two or more lines:

Please Enter a Valid Value:
(Option1, Option2, Option2, etc)

I don't know if this functionality has been retained in the current versions of Access.  You might want to give it a try.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37824769
<Is it possible to set the field criteria of a  query to display a list to select from, when the query is called?>
You can use a Multiselect Listbox...
http://access.mvps.org/access/forms/frm0007.htm
(http://access.mvps.org/access/reports/rpt0005.htm)
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37824782
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 75
ID: 37824806
Right ... of course, that list box in on a form ... the query does not make it popup at runtime ...

mx
0
 

Author Comment

by:dibrandt
ID: 37967944
I've requested that this question be deleted for the following reason:

Question was answered (sort of), points were awarded!
0
 
LVL 9

Expert Comment

by:macarrillo1
ID: 37961226
How did you resolve this problem?
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37967943
<Question was answered (sort of), points were awarded!>
Not that I know of, you are just requesting the the Q be deleted...?
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37967945
See my post before this one
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

707 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

18 Experts available now in Live!

Get 1:1 Help Now