Results 1 to 4 of 4

Thread: searching

  1. #1
    Join Date
    Oct 2003

    Unanswered: searching

    I have a cross tab query set up which iwould like to search for a criteria which is input by a user. i have a form set up which includes a command button and a text box. I have been trawling through the Help but cannot find a solution, other than i need to use a parameter query, how do i set one of these up?

  2. #2
    Join Date
    Oct 2003


    It's a bit hard to describe. Basically when you design the query you define "parameters" to it, then when you open the query it has a "Parameters" collection into which you put the values.

    Clear as mud, eh?

    Surf the web for some examples. Maybe Or use Google. A complete example is worth a thousand words. Maybe even worth the price of a book.
    ChimneySweep(R): fast, automatic
    table repair at a click of the

  3. #3
    Join Date
    Jun 2003
    Provided Answers: 1
    It depends on what you want to do with the data you look up.

    If you just want to find or display a single value from the table, you can use the DLOOKUP function and pass it the name of the column you want, the name of your cross-tab query, and the filter criteria.

    If you want to display a number of records that match your criteria then you could create a query that filters your original cross-tab, or create a copy of your cross-tab that accepts a parameter. This can be done by putting a reference to your form field into the cross-tab's criteria row.

    You could also put your cross-tab query into a subform of your main form and then link it on the criteria field.

    There are other options as well (such as dynamic SQL), but what is best depends upon the details of your application.

    Be aware that linking or filtering to cross-tab queries can be tricky, because the columns in the result-set are not normally determined prior to run-time, and can vary from one execution to another. If you can, specify the columns that will be returned in the design grid of your cross-tab query.


  4. #4
    Join Date
    Oct 2003
    The user is simply inputing some text which is to be entered into the parameter query which looks across 4 fields in 4 tables (one in each). i need to know how to set up the parameter query and its input form

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts