append query

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
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.
 
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
 
Back
Top