Query from different tables from user input

V

Vacco

I have an inventory database with tables for each type of item in inventory.
Each table has the same feilds for the equiptment type. Is there anyway to
run a query from different tables based on user input before query is run?

Thanks Vacco
 
D

Douglas J. Steele

Why? As in why do you have multiple tables like that? Copy everything into a
single table and query against that single table.
 
V

Vacco

The reason why there are a table for each piece of equiptment is each piece
is in service for at least ten years and within the ten years it may go to
different locations. I needed to track each item's and locations history and
this therefore the database is quite becomes large as a single table.

What I need to do is run a query on a location and/or an items history based
on user input. Kind of like a parameter query but using multiple tables.

Thanks Douglas
 
C

Chris Mills

Without getting into the reasons for table design, you can see the Query
methods in Help just as well as I can.

You can "Join" tables within queries.

You can query multiple tables with "UNION" queries.

You can make a Query to join or unionise tables and then make another query on
the result (provided you don't come across "Too Complex".

Are you asking how to write SQL queries? Try asking in "Getting Started", or
better still experiment with Help and Access samples. As best I can tell, you
are looking for a "UNION" query.

There is not usually a need to have a separate table for each type of
equipment, you just have a field in the table called "Type" (actually, that's
a reserved word). I couldn't care less if you want to keep it for 1 year or 10
years. If you need to track an item's history (every time it moves where,
when) you would invent a SUB-table, and control it via Relationships.

Chris
 

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