• Query Criteria (Access2000)

    Author
    Topic
    #360234

    I have the following problem. I have few feilds (Date, Name, INTL_SHARE, SFM_1, SFM_2) in a query. What I want to do is display INTL_SHARE ONLY when SFM_1 OR SFM_2 are not empty. I don’t know how to write a criteria for this. Any help?

    Viewing 1 reply thread
    Author
    Replies
    • #541991

      Have you tried using ‘Is Not Null’?

      • #541993

        ya but that doesn’t work with what I want to do. I want something like: Not Null = SFM_1 Or SFM_2. I tried that too but it looks like I add anything to Is Not Null or Not Null criteria.

    • #541999

      Try putting all three fields in the query grid. Uncheck the Show check boxes for SFM_1 and SFM_2. On the first criteria line for SFM_1, type Is Not Null. On the second criteria line for SFM_2, type Is Not Null.
      I believe that should list only the INTL_SHARE field for records where either SFM_1 or SFM_2 have a value.

      • #542012

        I’ve tried that as well. The problem is: When SFM_1 is null it’s not displaying the value for SFM_2 and I don’t want that.

        • #542018

          in sfm_1 place the not null on the first criteria line
          on the sfm_2 put the not null in the second criteria line

          • #542021

            Thank you JerryC, It seems to be working now, I’ll be in touch if it gives me any other problems.
            bow

        • #542023

          Well then, I am confused … when you said “What I want to do is display INTL_SHARE ONLY “, I thought that meant INTL_SHARE was the ONLY field you wanted to display. I will try to be more helpful if you can explain what fields you want displayed and the condidtions that should cause them to be displayed ?

          • #542031

            what I meant was I don’t want to display INTL_SHARE when SFM_1 or SFM_2 is null. But I do want to display it when either one of the isn’t null.

            Thanks….

            • #542041

              now i’m confused
              you don’t want to see INTL_SHARE when SFM_1 is null and SFM_2 is not null
              and you don’t want to see INTL_SHARE when SFM_2 is null and SFM_1 is not null
              is this correct

            • #542044

              No, What I want was to display the value for INTL_SHARE when either SFM_1 or SFM_2 has a value.
              SORRY but I’m not good at explaining.

            • #542046

              so is the query criteria working for you now

            • #542047

              I really don’t know but it seems to be working with the data I’ve got now.

    Viewing 1 reply thread
    Reply To: Query Criteria (Access2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: