How to use access 2007 external database paths

  • Thread starter Thread starter codeSlave
  • Start date Start date
C

codeSlave

I have a database that several computers access. I have a query that is a
union something like this:
SELECT main.*,"list1" as owner
FROM C:\path\test1.mdb.main
where main.listname<>"condition"
UNION
Select main.*, "list2" as owner
From C:\paths\test2.accdb.main

Now this works fine from the hosting computer, but from another computer it
doesn't. I am now using the shared drive name\path in a second query and
advising users to use the correct query. this seems like a hack. Is there a
way of making it so I can use just one query so all users trying to execute
the query can without multiple query's?
 
If I'm understanding you correctly, the issue is that C:\paths\test1.accdb
and C:\paths\test2.accdb don't exist on the users computers, but rather on
the host computer. You should be able too use an UNC instead:

SELECT main.*,"list1" as owner
FROM \\servername\C$\path\test1.mdb.main
where main.listname<>"condition"
UNION
Select main.*, "list2" as owner
From \\servername\C$\paths\test2.accdb.main
 
Works like a champ, much thanks.

Douglas J. Steele said:
If I'm understanding you correctly, the issue is that C:\paths\test1.accdb
and C:\paths\test2.accdb don't exist on the users computers, but rather on
the host computer. You should be able too use an UNC instead:

SELECT main.*,"list1" as owner
FROM \\servername\C$\path\test1.mdb.main
where main.listname<>"condition"
UNION
Select main.*, "list2" as owner
From \\servername\C$\paths\test2.accdb.main

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)





.
 
Back
Top