Select Query parameter

Posted on 2005-04-07
Medium Priority
Last Modified: 2008-02-26
   I am trying to design a select query that will prompt for two separate inputs and then search a table.

I have no problem getting access to prompt for one input. In design view I use:

[Enter artist name]:

I enter the artist name and then Access  returns the information for one artist. I want access to prompt me for two artist name and then return the desired information.

Do I use the sql language to solve this problem? Or is there another way to solve the problem with access?

Can someone point me in the right direction to solve this problem?

Question by:LearningJava
LVL 23

Expert Comment

ID: 13731843
Add the field ArtistName for the second time to the query and add in the or line: [Enter second artist name]
LVL 11

Accepted Solution

Jokra_the_Barbarian earned 1400 total points
ID: 13731894
So you SQL (for the query) would be something like this:

FROM myTable
WHERE (artistName = [Please Enter Artist Name])
  OR (artistName = [Please Enter 2nd Artist Name])

Featured Post

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

840 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