Results 1 to 2 of 2

Thread: [RESOLVED] RecordSelectionFormula and IN keyword

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2005
    Posts
    169

    Resolved [RESOLVED] RecordSelectionFormula and IN keyword

    HI,
    I want to filter a report using RecordSelectionFormula based on criteria I select at runtime.
    I can get it to work for one value:
    mFilterString = "{rptOutputAll;1.ADAccount} = 'abc'"

    I have a list of discrete values for
    account names and I want to select the records relating to more than
    one. I have tried using the 'IN' keyword but cannot get it to work.
    None of the following work:

    mFilterString = "{rptOutputAll;1.ADAccount} IN Array(" & Chr(34)
    & "abc" & Chr(34) & ", " & Chr(34) & "def" & Chr(34) & ")"

    mFilterString = "{rptOutputAll;1.ADAccount} IN Array('abc','def')"

    mFilterString = "{rptOutputAll;1.ADAccount} IN ('abc','def')"

    How do I do this??

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Jun 2005
    Posts
    169

    Re: RecordSelectionFormula and IN keyword

    Got it.
    Instead of using IN, use Like as follows:
    mFilterString = "{rptOutputAll;1.ADAccount} LIKE ['abc', 'def']"

Posting Permissions

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



Click Here to Expand Forum to Full Width