Null Parameter

G

gtait1

Hi,

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

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

Vacuum Sealed

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.
 
G

gtait1

Vacuum said:

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 s

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 t
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 o
a query so that when a parameter field is left empty it shows all th
results instead of limiting it to what you have but in the field.

Thank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top