I'm running Access 2002. In VBA how do I select records into a temorary table to use in the next sql query instead of creating an actual table that will need to be deleted? I saw in one of my searchs that using the "#" as the first character of the table name will do this, but I get an error.
strSQL = "SELECT [PR DC Alloc Hrs].[Employee Number], '000001' AS DC INTO #EMP FROM [PR DC Alloc Hrs] " & _
"GROUP BY [PR DC Alloc Hrs].[Employee Number], '000001';"
DoCmd.RunSQL strSQL
Thanks for any help.
strSQL = "SELECT [PR DC Alloc Hrs].[Employee Number], '000001' AS DC INTO #EMP FROM [PR DC Alloc Hrs] " & _
"GROUP BY [PR DC Alloc Hrs].[Employee Number], '000001';"
DoCmd.RunSQL strSQL
Thanks for any help.