Hi,
I am using Dlookup in a query in database A. I want to run this query from database B, via a VB .execute statement. But the query fails, with error #3078. I believe it's failing because of the DLookup. The table that Dlookup needs to use is, of course, in database B. My theory is that Dlookup is trying to look in database A, where the table doesn't exist.
I know several ways I can resolve this, but I'm curious. Is there a way to structure the DLookup statement to make it clear which database for it to look in?
I am using Dlookup in a query in database A. I want to run this query from database B, via a VB .execute statement. But the query fails, with error #3078. I believe it's failing because of the DLookup. The table that Dlookup needs to use is, of course, in database B. My theory is that Dlookup is trying to look in database A, where the table doesn't exist.
I know several ways I can resolve this, but I'm curious. Is there a way to structure the DLookup statement to make it clear which database for it to look in?