Access 97 queries to search both local & linked tables?

R

Richard Yates

I'm wanting to set up a query to search similar data type
tables on both a local and a linked table. Is there a
method to do this?

i.e. network shared database with inventory table & a
local database with inventory table (same format).

I'd like to use a query on the local database to search
for an item 'X' and return any/all instances of this item
on both databases.
 
D

Dave - Freedonia

I believe you first would need to have a linked table in your local
database to the table in the network database. After that, do a UNION
query for the same item in each table.

SELECT * FROM localtablename WHERE item = 'X'
UNION
SELECT * FROM networktablename WHERE item ='X'


HTH,
Dave
 
R

Richard S. Yates

Thanks for the reply Dave, after reviewing this database a
little more I've discovered that the search function
exists as a combo box with the following row source
properties :

SELECT DISTINCTROW tblParts.PN FROM tblParts ORDER BY
tblParts.PN;

I tried modifying it to read variations of the following:

SELECT DISTINCTROW tblParts.PN FROM tblParts UNION SELECT
DISTINCTROW tblParts1.PN from tblParts1;

tblParts is local, tlbParts1 is linked.
I can find a part unique to the local table, but a search
of a part number specific only to the linked table returns
a different record from the number entered. I really need
to study up on SQL.
 

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