Select Query parameter

Posted on 2005-04-07
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

    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

    So you SQL (for the query) would be something like this:

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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    The first two articles in this short series — Using a Criteria Form to Filter Records ( and Building a Custom Filter ( — discuss in some detail how a form can be…
    In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
    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.
    What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

    737 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

    22 Experts available now in Live!

    Get 1:1 Help Now