Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2004
    Location
    austin
    Posts
    146

    Unanswered: Like "*" in a query

    how can i rewrite this query to get all the results possible

    IIf([Forms]![Frm_Home]![cmb_product]="All","Like '*'",[Forms]![Frm_Home]![cmb_product])

  2. #2
    Join Date
    Feb 2004
    Posts
    199

    IIf([Forms]![Frm_Home]![cmb_product]="All","Like '*'",[Forms]![Frm_Home]![cmb_product])


    this isn't query, maybe this is part of where condition. what type of is filed , you're filtering?
    MDB, ADP <-> MS SQL + VBA, ADO & RDO, .NET, Oracle, Java/Jsp.

  3. #3
    Join Date
    Jan 2004
    Location
    austin
    Posts
    146
    number field.

    it works if i do the query like this

    IIf([Forms]![Frm_Home]![cmb_product]="All","1'",[Forms]![Frm_Home]![cmb_product])

    but if the user selects All i need to return all the values in the table.

  4. #4
    Join Date
    Mar 2003
    Posts
    46
    Set criteria to:

    Like IIf([Forms]![Frm_Home]![cmb_product]="All","*",[Forms]![Frm_Home]![cmb_product])

    should do the trick.

    C

  5. #5
    Join Date
    Feb 2004
    Posts
    199
    you didn't answered me, what is the expression you tiped, query where condition part or what?

    anyway if you use this expression in where condition of query

    ([Forms]![Frm_Home]![cmb_product]="All") OR (yourfieldnname=[Forms]![Frm_Home]![cmb_product])

    you'll get what you want
    MDB, ADP <-> MS SQL + VBA, ADO & RDO, .NET, Oracle, Java/Jsp.

  6. #6
    Join Date
    Jan 2004
    Location
    austin
    Posts
    146
    Originally posted by CCC
    Set criteria to:

    Like IIf([Forms]![Frm_Home]![cmb_product]="All","*",[Forms]![Frm_Home]![cmb_product])

    should do the trick.

    C

    that worked.... thanks for the help

Posting Permissions

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