Results 1 to 2 of 2

Thread: Record Selection Problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2004
    Posts
    1

    Record Selection Problem

    I've got a Parameter called {?Action}. The user may choose not to set that parameter - so it will get a value of "" if the user doesn't give it a value.

    The Action field in the database may be NULL, "", or a value. My record selection formula works when the Action field is not NULL or "", but it doesn't work otherwise

    Here's my Record Selection Formula:



    Code:
    IIF(Len(Trim({?Action})) > 0, {Action} = {?Action},  ({Action} <> '' OR {Action} = '' OR IsNull({Action})))
    This will return all rows where there is some kind of value in the Action field but will not return any NULL or '' values. Ugh.

    Any help?

    Thanks!
    Last edited by brooksdotnet; Aug 26th, 2004 at 02:08 AM.

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758
    The parameter is optional, either use it or don't. If the Action parameter exists. then the Action field must equal the parameter. If it does not exist then there is no reason to do any checks.

    Try this...

    If Len(Trim({?Action})) > 0 Then {Action} = {?Action}

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