Unknown parameter query

D

dbatleedsmet

I have a database with an Item table having fields that record Inventory
number, old Inv # ledger #, make, model, Serial number, etc.
Sometimes the item gets stolen and we need to find it, but..... that
particular number may have perhaps only the make or model available. (
Some of our stock goes back a few years and not all were marked up with
all the Idents )
Now I could set up multiple queries to find the individual field - but
if the first search fails , you have to go all through the search
process on a different field query - I want to set up a single query
that allows you to enter one or more known values from all of them that
will come up with the answer!
Help would be appreciated as this has been bugging me for some time.
I'm not into code building however, so I'd need a sample code to follow
if you don't mind
Cheers
 
N

Nikos Yannacopoulos

Code is nicer, but since you're not into it, you can do it without...
Make a select query with all the table fields you need, and in the Critreria
lines in the design grid insert something like the following for each field
toy want to search on:
Like "*" & [Make?] & "*"
Like "*" & [Model?] & "*"

When you run the query, you will get as many input boxes opening up as the
number of criteria. For each inputbox, if you type something in, the
relating criterion will be applied; if you just click OK (or hit enter)
without typing in anything, it will result in no filtering on that field.
So, you will have combined filtering on as many fields as you type filters
for.

HTH,
Nikos
 

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