Using InputBox to Change Query Criteria

Posted on 2008-11-13
Last Modified: 2012-05-05
Hello Experts,
I am trying to reduce the amount of queries I have in my database.  I have a query, lets say QRY1, that is the data source for multiple forms.  I want to use the InputBox to add criteria to that query.  I know I can do this in design view of the query, but I have multiple critera depending on the user and I don't want to have QRY1 with the [] under one field, the QRY2 (the same tables as QRY1) with [] under a different field.  Does this make sense?  Can this be done with the InputBox?  Thanks in advance for all who reply.
Question by:cebaker75
    LVL 75

    Accepted Solution

    "Can this be done with the InputBox? "

    A query cannot reference the InputBox AFAIK.  However, you could have a small pop up form with a text box for criteria ... and have the query reference that text box, like so



    Author Closing Comment

    Thanks DMX!  That works great.
    LVL 75

    Expert Comment

    by:DatabaseMX (Joe Anderson - Access MVP)
    ok ... you are welcome ...


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    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

    Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
    I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
    In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
    With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

    779 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

    15 Experts available now in Live!

    Get 1:1 Help Now