append query

G

Guest

append query contains expressions, designed & tested - works! now I have to
import next day's file & append - is there some macro or quick fix other that
changing the append from table name in each column of the query and in the
expressions?
 
D

Douglas J. Steele

Are you saying that you have a different table for each day? That doesn't
sound like a particularly good design. Add a Date column to your table, and
use that to determine which day each record is for.
 
G

Guest

If I understand your question, you import a table on a daily bases to append
to a table in your database. The name of the table changes on a daily bases.
Assuming I understand the problem, here is a way to do it, I think.

First, you will have to have a way to select the table to import. I assume
you have that under control. For example purposes, I will call it
"strTodaysTable"

Set qdf = dbs.QueryDefs(strQryName) 'This would be your append query
strQry = qdf.SQL
strQry = Replace(strQry, strYesterdaysTable, strTodaysTable)
qdf.SQL = strQry
qdf.Close
 

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