+ Reply to Thread
Results 1 to 4 of 4

Microsoft Query - Return all unless a parameter is entered

  1. #1
    Forum Contributor
    Join Date
    07-07-2005
    Location
    England
    MS-Off Ver
    Office 2019 Enterprise
    Posts
    462

    Microsoft Query - Return all unless a parameter is entered

    Hi all,

    could someone help with this please..

    I am querying a database in Microsoft Query and I have it set to pull in jobs that match a customers code in cell A1. I would like it so that if cell A1 is blank, it pulls in jobs for every customer.

    Could someone advise please? My code is below..

    Please Login or Register  to view this content.
    Thanks
    John
    Last edited by NBVC; 08-20-2009 at 01:02 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Microsoft Query - Return all unless a parameter is entered

    I think it would be something like:

    Please Login or Register  to view this content.

    Then in another cell in the sheet use formula:

    ="%"&A1&"%"

    and reference that cell as a Parameter.
    Last edited by NBVC; 08-20-2009 at 10:57 AM.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    07-07-2005
    Location
    England
    MS-Off Ver
    Office 2019 Enterprise
    Posts
    462

    Re: Microsoft Query - Return all unless a parameter is entered

    Spot on mate, works perfect. Cheers

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Microsoft Query - Return all unless a parameter is entered

    You are welcome,

    Please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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