Access 97 queries to search both local & linked tables?

  • Thread starter Thread starter Richard Yates
  • Start date Start date
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.
 
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
 
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.
 
Back
Top