On Wed, 28 Jan 2004 13:12:43 +0100, "Danny Pagnaer" <dp******@ford.com> wrote:
Hi,
Who can help me out with this problem:
Before I do an update query in database1, I want to know if a field in
another database already has been updated.
Does anyone knows the right way to write this down in vba?
thanks,
Danny
Well, the obvious way would be to first create an attachment to the table in
the other database, then jsut treat it as if it were local. If you need it to
me more dynamic than that, you can use the In "<database-name>" clause after
the From clause. Since there is only one In "<database-name>" clause for the
whole query, not one for each table, you have to do it in a subquery, sort of
like this...
Update tblFoo SET tblFoo.Foo=1 WHERE tblFoo.FooID NOT IN (
SELECT tblBar.FooID FROM tblBar IN "C:\Elsewhere\xyz.dbf")