W
WSF
Access 97
I am creating a table in a temp database and linking it to the current db.
This is working well longhand as far as the query is concerned.
But I would like to use variables representing the query in the statement.
The code example is
dbs.Execute "SELECT qryAllToday.* INTO " & TempTable & " IN '" &
ReportsTempDBase & "' FROM qryAllInToday;"
Where
qryAllToday is a select query in the current mdb
TempTable is already a variable representing the desired name in the temp
mdb.
ReportsTempDBase is already a variable representing the path and name of the
temp DB.
This works ok.
But I am struggling to get it to work by substituting the query
[qryAllToday] here as a variable (DIM'd as a String).
I am getting various errors depending on the variation I make in attempting
to get it to work.
I do not want to include the .* representing all records from the query as
part of the queryname variable, but have it in the statement separately, so
I can recycle the code. Any help gratefully appreciated.
Regards,
WSF
I am creating a table in a temp database and linking it to the current db.
This is working well longhand as far as the query is concerned.
But I would like to use variables representing the query in the statement.
The code example is
dbs.Execute "SELECT qryAllToday.* INTO " & TempTable & " IN '" &
ReportsTempDBase & "' FROM qryAllInToday;"
Where
qryAllToday is a select query in the current mdb
TempTable is already a variable representing the desired name in the temp
mdb.
ReportsTempDBase is already a variable representing the path and name of the
temp DB.
This works ok.
But I am struggling to get it to work by substituting the query
[qryAllToday] here as a variable (DIM'd as a String).
I am getting various errors depending on the variation I make in attempting
to get it to work.
I do not want to include the .* representing all records from the query as
part of the queryname variable, but have it in the statement separately, so
I can recycle the code. Any help gratefully appreciated.
Regards,
WSF