Re: Parameter Query

From: Tom Ellison (tellison_at_jcdoyle.com)
Date: 09/13/04


Date: Mon, 13 Sep 2004 14:16:02 -0500

Dear Neil:

I don't expect this answer will make me very popular.

I think the first parameter should be served on a form in a combo box
with the "two more fields from that table" as additional columns in
the combo box, hidden from view if desired. These can then be
accessed from the query.

In most cases, it isn't good design to have several tables with the
same columns and then have to choose between them. Whenever possible,
just put them all into one table, distinguishing between them with an
additional column.

You could, however, use a value list combo box, or create a table with
the names of these tables. You would then code to build the SQL of
this query and execute it from there. This you will certainly not be
able to do with a parameter.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts

On Mon, 13 Sep 2004 11:57:07 -0700, Neil Cash
<NeilCash@discussions.microsoft.com> wrote:

>This is going to be kind of hard to explain, so bare with me. I want to run
>a query with two parameter values which are entered by the user. The first
>value comes from one table (main table), which then in turn shows two more
>fields from that table. The second value is the name of another table
>(variable table). Which in turn shows three more fields of that table. Can
>Access link the variable table (all variable tables have the same field
>names) to the main table and run a query, when the variable table is defined
>by the user? I hope that was clear.



Relevant Pages

  • Re: Managing duplicates when INSERTing.
    ... is it possible to write an update query to do this ... You can import without a PK, eliminate duplicates, then establish the ... >> Tom Ellison ... >> Microsoft Access MVP ...
    (microsoft.public.access.queries)
  • Re: Subtracting date and time values
    ... computation with the next Date Opened to produce MTBF (Mean Time ... I can provide you with the query to do this. ... >>Tom Ellison ... >>Microsoft Access MVP ...
    (microsoft.public.access.queries)
  • Re: Query Help.. Creating a running Total Field?????
    ... Here's an approximate query: ... ORDER BY ClientCode,, Autonumber ... >> Tom Ellison ... >> Microsoft Access MVP ...
    (microsoft.public.access.queries)
  • Re: How to count record
    ... "Tom Ellison" wrote: ... I built a database with your 2 tables, entered the data, and tested. ... The result of running this query are: ... Microsoft Access MVP (watch out! ...
    (microsoft.public.access.queries)
  • Re: line numbers
    ... then the next time you run this query, the row that was 3 before is ... you cannot use these numbers as a long-term reference ... >>Tom Ellison ... >>Microsoft Access MVP ...
    (microsoft.public.access.queries)