Hi Alex,
OK, but the file (MDB) used as part of the IN is
requested at runtime through a dialog. How can I take a
stored (permanent) query and set the IN prior to executing
my second query (which will reference my first query).
Thanks,
Leif
-----Original Message-----
Hi Leif,
what i mean that you can have Query 1 reading a table in
External Database
using IN. then you dont need to link table and remove it
--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com
message
Hi Alex,
Your thinking about a query created as part of a
recordset? I have a query already created. It is
referencing my link tabled. I think to use the IN
clause
your thinking of a recordset created with a SQL
statement
dynamically, is that correct? How then do I use that
query as a source for yet another query that does my
unmatch check?
What I do now works, it just seems ackward, since I
create
a temporary link. It works as follows:
External Database
|
|
V
Table in current database (linked to above - dynamically
via VBA - docmd.TransferDatabase)
|
|
V
Query 1 (filters records from above - serves as source
for
query 2)
| Table 1 (internal)
| |
V V
Query 2 (does an outer join on query 1 and table 1 in
current db to give unmached records to be appended to
table 1)
Final step - remove link to external table.
-----Original Message-----
Hi Leif,
not sure i understand everything. but you can change
Source Database - just
change query SQL, modifying path to db for IN clause
--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com
message
Alex, thanks for your reply.
I know about the IN clause. I've used it before.
However, in this case I'm not interested in the
results
of
this query, instead it is being used in a second
query
as
a datasource to join with an internal table. Perhaps
there is a way to set the "Source Database" property
of
my
stored query, prior to it be referenced by my second
query.
Regards,
Leif
-----Original Message-----
there is no need to link, you can use IN Clause to
refer
to external mdb
SELECT CustomerID
FROM Customers
IN OtherDB.mdb
WHERE CustomerID Like "A*";
see online help for more info
in
message
I need to be able to update two different Access
tables
from an external Access database. I think I have
a
solution, but it seems ackward.
Right now I creating a link to the external Access
table
using docmd.Transferdatabase. Next I run a query
that
does an unmatched selection joining the external
and
internal tables. The external table is accessed
thru a
different query that does some filtering.
Once I'm done with the query data I need to go
back
and
remove the table link.
Is there a better way? Pherhaps I can skip the
link/remove link steps by updating the filtering
query
with the external database file name?
Regards,
Leif
.
.
.