Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 2
Default Null Parameter

Hi,

I have been looking everywhere for an answer to my problem but non that I can find seem to be working.

I am pulling a database from a hiring software using MS query. It has a list of different items we hire out, which I have narrowed down using a parameter on the category field. I now want to narrow it further using the name, which is fine however I need it to still give all the results of the category if the parameter is left blank. All the answers I have seen for the same problem and I dont totally understand SQL so would ideally like to get the desired results using the criterea. Although any answer would be usefull!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 259
Default Null Parameter

On 19/07/2012 2:11 AM, gtait1 wrote:
Hi,

I have been looking everywhere for an answer to my problem but non that
I can find seem to be working.

I am pulling a database from a hiring software using MS query. It has a
list of different items we hire out, which I have narrowed down using a
parameter on the category field. I now want to narrow it further using
the name, which is fine however I need it to still give all the results
of the category if the parameter is left blank. All the answers I have
seen for the same problem and I dont totally understand SQL so would
ideally like to get the desired results using the criterea. Although any
answer would be usefull!




Hi

Just to clarify, this is an Excel NG...

That said, if you are importing data from a database into a workbook
then maybe you can share with us what code(s) you are currently using so
we can get a better picture...

Cheers
Mick.

  #3   Report Post  
Junior Member
 
Posts: 2
Default

Quote:
Originally Posted by Vacuum Sealed View Post
On 19/07/2012 2:11 AM, gtait1 wrote:[color=blue][i]
Hi

Just to clarify, this is an Excel NG...

That said, if you are importing data from a database into a workbook
then maybe you can share with us what code(s) you are currently using so
we can get a better picture...

Cheers
Mick.
Hi Mick,

What is an Excel NG? Also I am not sure what codes would be helpful to see this is the sql statemet if this helps;

SELECT resource_0.resourceID, resource_0.generic, resource_0.productcode, resource_0.department, resource_0.category, resource_0.subcategory1, resource_0.name, resource_0.description, resource_0.nominalcode, resource_0.serialnumber, resource_0.barcode, resource_0.purchaseprice, resource_0.purchasedate, resource_0.purchaseauthorisationnumber, resource_0.notes, resource_0.jobID

What I was really wanting was just a statement to put in the criterea of a query so that when a parameter field is left empty it shows all the results instead of limiting it to what you have but in the field.

Thanks
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Failed to save table attributes of (null) into (null). Luca Brasi Excel Discussion (Misc queries) 2 February 4th 09 05:30 PM
How to choose if I use a parameter or not in a parameter query Arnaud Excel Discussion (Misc queries) 0 March 8th 07 02:19 PM
COUNTIF says Null = Blank but Blank < Null Epinn Excel Worksheet Functions 4 October 25th 06 08:03 PM
Null, "null", vbNull, vbNullString, vbEmpty [email protected] Excel Programming 2 July 25th 06 01:28 PM
How to write parameter query with "or is null" criteria Vincent Alliance New Users to Excel 0 April 8th 06 02:55 AM


All times are GMT +1. The time now is 05:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"