By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,500 Members | 830 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,500 IT Pros & Developers. It's quick & easy.

Lookup in a different database?

P: n/a
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

Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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")
Nov 12 '05 #2

P: n/a
Yet another in a rash of messages sent through an anonymous remailer.

On 28 Jan 2004 14:06:57 -0000, An****************@See.Comment.Header (Daniel
Tan) wrote:
Danny Pagnaer 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


You should look into taking some classes at your local community college.


Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.