S
SimonG via AccessMonster.com
Hi
I'm trying to use a temporary table in an Access 2007 procedure (the
temporary table is only required during the life of the procedure).
Currently I am using a command in this format:
SELECT
fieldnames
INTO
#TempTableName
FROM
tablerelationship
WHERE
conditions
;
This is assigned to a variable, strSQL, and executed via
CurrentDb.Execute strSQL
When the code is ran, Access returns an error about the inclusion of a
reserved word.
If I remove the # from the start of the temporary table name the code
completes without error; although it does create a permanent table within the
database.
Can someone advise me where my syntax is going wrong (I have tried several
variations, but nothing that has worked to-date)?
Many thanks,
Simon
I'm trying to use a temporary table in an Access 2007 procedure (the
temporary table is only required during the life of the procedure).
Currently I am using a command in this format:
SELECT
fieldnames
INTO
#TempTableName
FROM
tablerelationship
WHERE
conditions
;
This is assigned to a variable, strSQL, and executed via
CurrentDb.Execute strSQL
When the code is ran, Access returns an error about the inclusion of a
reserved word.
If I remove the # from the start of the temporary table name the code
completes without error; although it does create a permanent table within the
database.
Can someone advise me where my syntax is going wrong (I have tried several
variations, but nothing that has worked to-date)?
Many thanks,
Simon