How do I create a dynamic link to a table within a query?

G

Guest

I am creating a simple append query that will find any records in table B
that are not included in table A and then will add that record to table A --
table B will change from month to month so I want to create a query where I
will be able to identify the table to check against table A based on Acess'
unknown parameter feature.

For the bigger picture, I am pulling data in each month from an external
source and then updating a master table with that data. My first step on
updating the master table is identifying any new records in the new external
source database. If I find new data then I am using an append query to
create a new record. Then I update the records in the master table with new
monthly figures from the exernal data source. I know I can copy the external
data table to a "CurrentTable" each month as part of a vba procedure, but was
wondering if Access has the ability to have dynamic table links within a
query?
 
M

MGFoster

Rubble wrote:
but was
wondering if Access has the ability to have dynamic table links within a
query?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

No. You'll have to create an SQL string using VBA & insert the table
name in the string. E.g.:

Dim strSQL As String

strSQL = "SELECT * FROM imported_table INTO " & strTableName

CurrentDb.Execute strSQL, dbFailOnError

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQuBy/oechKqOuFEgEQJK7gCgi8BCuxbwpiLrdgDVZO/9TcTJeVsAnA0x
Gv7krJJuTt1Tcsi1cz+y5Tg/
=6z9+
-----END PGP SIGNATURE-----
 
G

Guest

Thank you -- I figured it was going to endup being a vba thing -- I just
wanted to make sure I wasn't missing something.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top