using a Like[ ***] & "*" to query multible cells

J

jeremy

Hello,

I have a table with 10 fields Quantity1 through Quantity10

Is there a way I can query all ten cells at once with only
onle user imput ?

thanks in advance,

Jeremy
 
R

Roger Carlson

No. Thats why you should never have fields like Qty1, Qty2, and so forth.
Instead, you should have a separate table in which you would a foreign key
to your main table and just one quantity field. Then you create a
one-to-many relationship between the two. It is more complex to set up and
enter data (you usually use a subform), it makes querying the data MUCH
easier and what's more important, much more reliable.

Sorry I can't help more.

--Roger Carlson
www.rogersaccesslibrary.com
Reply to: Roger dot Carlson at Spectrum-Health dot Com
 
J

John Spencer (MVP)

Yes, but you should really look at normalizing your structure.

In a query,
Parameter [Find What] Long;
SELECT * FROM TABLE
WHERE
Field1 = [Find What] OR
Field2 = [Find What] OR
Field3 = [Find What] OR
....
Field10 = [Find What]

I assume that Quantity1 etc is a numeric field with only integer values.
 

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