Results 1 to 2 of 2

Thread: Query (2000)

  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Query (2000)

    I have a query where three fields are defined like the following: Occupational: Trim([LindasMailer_Occupational_Therapy_Provision.Provis ionDetail])
    The other two fields are similar but different names (Speech, Physical)
    I created a calculation (Therapies) using these three fields - Therapies: IIf([Occupational] Or [Physical] Or [Speech]="Yes","Y","N")

    The problem is when I put a "Y" in the "Therapies" criteria it doesn't work. I get a "Enter parameter box" for "Occupational", "Physical", and "Speech"
    When I run the query without the "Y" criteria, the field has "Y" and "N". Is it possible to designate criteria for this field?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Query (2000)

    I'm not sure I understand what you are doing, but I would suggest to save the query with Occupational, Speech and Physical, but without Therapies.
    Then create a new query based on the query you just saved, add the fields you want to return, plus this calculated field:

    Therapies: IIf([Occupational]="Yes" Or [Physical]="Yes" Or [Speech]="Yes","Y","N")

    BTW, it would be more efficient to use True/False values instead of strings like "Yes", but it might involve changing a lot of other things.

Posting Permissions

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