Results 1 to 4 of 4
  1. #1
    Newby is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Posts
    60

    form filtered query

    Hi



    I am trying to create a query based on a form combo box. The options are personal, rental or all. The query runs fine went I select personal or rental, but when I select all, I get nothing. Here is my criteria formula below.

    IIf([Forms].[SourcesSelect].[Cbx_RentalPersonal]="All","*",[Forms].[SourcesSelect].[Cbx_RentalPersonal])

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,952
    Need LIKE operator in front of that expression.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Newby is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Posts
    60
    I tried this and still get a null return.

    IIf([Forms].[SourcesSelect].[Cbx_IncExp]="All",Like '*',[Forms].[SourcesSelect].[Cbx_IncExp])

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,952
    LIKE IIf([Forms].[SourcesSelect].[Cbx_RentalPersonal]="All","*",[Forms].[SourcesSelect].[Cbx_RentalPersonal])
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Re-query in a filtered form
    By tonygg in forum Access
    Replies: 5
    Last Post: 01-02-2018, 04:29 PM
  2. Filtered Report from filtered datasheet form
    By gemadan96 in forum Reports
    Replies: 7
    Last Post: 01-03-2014, 05:12 PM
  3. Export Filtered Query to Excel Using Combo Box on Form
    By besuchanko in forum Import/Export Data
    Replies: 0
    Last Post: 02-07-2013, 10:10 PM
  4. Report based on Query but filtered by form
    By michel_annie22 in forum Reports
    Replies: 1
    Last Post: 10-23-2012, 10:40 PM
  5. update query fon a filtered form HELP!
    By campanellisj in forum Queries
    Replies: 0
    Last Post: 11-12-2010, 09:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums