+ Reply to Thread
Results 1 to 2 of 2

Microsoft Query - How to show all results if paramter field left blank

Hybrid View

  1. #1
    Registered User
    Join Date
    09-01-2012
    Location
    West Midlands, UK
    MS-Off Ver
    Excel 2010
    Posts
    16

    Microsoft Query - How to show all results if paramter field left blank

    Hi,

    If someone could help me with this I would be very grateful;

    I have three search boxes in XL , two are search from and to dates and the other is search be ref.

    I can currently search by dates and ref but would like to show all records in the specified dates if the ref field is left blank.

    I am using the query writer and referencing back to cells in XL. I don't use the wizard or SQL. I have tried many options and think I should be using a OR statement with a wildcard but can't seem to get the result, does the wildcard just show the blank cells in the actual data?

    Many thanks for any help

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,754

    Re: Microsoft Query - How to show all results if paramter field left blank

    Can you post the SQL statement that is generated by the query writer? Difficult to analyze your situation without seeing what you are doing.

    i don't use MS Query to often, but in Access the criteria to get all data when the textbox on the search form is left blank

    Like Forms!FormName.Fieldname & "*"
    I am thinking that you may need something similar.
    Last edited by alansidman; 11-03-2013 at 03:02 PM.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to show results of index small if from left to right
    By suton in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-17-2013, 06:39 AM
  2. Help with query using paramter and like operator
    By sumdumgai in forum Excel General
    Replies: 0
    Last Post: 09-19-2012, 10:41 PM
  3. Show results of VLOOKUP as blank...
    By hutch@edge.net in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-27-2008, 03:51 PM
  4. In Excel, how to make a field required so it's not left blank?
    By linplex in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-05-2006, 10:15 AM
  5. Execute Macro once Microsoft Query results complete
    By gwa3000 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-19-2005, 04:35 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1