Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2003
    Posts
    83

    Unanswered: Parameter queries- need help

    I need a prompt for the location in my query, so the users can add different locations and do the search. I am not sure how to add the prompt for a text datatype. The query is as follows:

    SELECT Log.Location, [Patient Table].Language, Interpreters.[Interpreter Name], Count(Log.[Visit Date]) AS [Count]
    FROM [Patient Table] INNER JOIN (Interpreters INNER JOIN Log
    ON (Interpreters.[Interpreter Name] = Log.[Interpreter Name])
    AND (Interpreters.[Interpreter Name] = Log.[Interpreter Name]))
    ON [Patient Table].[MR#] = Log.[MR#]
    WHERE ((([Patient Table].Language) Is Not Null)
    AND ((Log.Location) Is Not Null)
    AND ((Log.[Visit Date]) Between [First date (mm/dd/yy)] And [Last date (mm/dd/yy)]))
    And Log.Location = "Diabetic Clinic"
    GROUP BY Log.Location, [Patient Table].Language, Interpreters.[Interpreter Name]
    ORDER BY Log.Location, [Patient Table].Language;

    Any help or clue is greatly appreciated.
    Thanks in advance.

  2. #2
    Join Date
    Feb 2004
    Posts
    137
    Try this:

    SELECT Log.Location, [Patient Table].Language, Interpreters.[Interpreter Name], Count(Log.[Visit Date]) AS [Count]
    FROM [Patient Table] INNER JOIN (Interpreters INNER JOIN Log
    ON (Interpreters.[Interpreter Name] = Log.[Interpreter Name])
    AND (Interpreters.[Interpreter Name] = Log.[Interpreter Name]))
    ON [Patient Table].[MR#] = Log.[MR#]
    WHERE ((([Patient Table].Language) Is Not Null)
    AND ((Log.Location) Is Not Null)
    AND ((Log.[Visit Date]) Between [First date (mm/dd/yy)] And [Last date (mm/dd/yy)]))
    And Log.Location = [Location?]
    GROUP BY Log.Location, [Patient Table].Language, Interpreters.[Interpreter Name]
    ORDER BY Log.Location, [Patient Table].Language;

  3. #3
    Join Date
    Sep 2003
    Posts
    83

    Parameter Queries - need help

    Thanks Matthew Reaves !!, it worked.

Posting Permissions

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