Hi,
I am running below code, with it i try to save the recordset as a table in the database. Creating and populating the recordset works ok, the 'saving' it to a table unfortunately not.
(error = cannot find input table rsTmp (3078))
Sub tmp()
Dim rsTmp As Recordset
Set rsTmp = New Recordset
With rsTmp
.Fields.Append "Uur", adChar, 2
.Fields.Append "UurNum", adInteger
.Fields.Append "SoortItem", adChar, 10
.Open
.AddNew
!Uur = "01"
!UurNum = 1
!SoortItem = "Bier"
.Update
.Close
End With
Qry = "Select rsTmp.Uur, rsTmp.UurNum, rsTmp.SoortItem _
INTO [TEMP] FROM rsTmp;"
DoCmd.RunSQL Qry
str_sql = "DROP TABLE TEMP;"
CurrentDb.Execute str_sql
End Sub
"In three words I can sum up everything I've learned about life: it goes on."
- Robert Frost 1874-1963
I am running below code, with it i try to save the recordset as a table in the database. Creating and populating the recordset works ok, the 'saving' it to a table unfortunately not.
(error = cannot find input table rsTmp (3078))
Sub tmp()
Dim rsTmp As Recordset
Set rsTmp = New Recordset
With rsTmp
.Fields.Append "Uur", adChar, 2
.Fields.Append "UurNum", adInteger
.Fields.Append "SoortItem", adChar, 10
.Open
.AddNew
!Uur = "01"
!UurNum = 1
!SoortItem = "Bier"
.Update
.Close
End With
Qry = "Select rsTmp.Uur, rsTmp.UurNum, rsTmp.SoortItem _
INTO [TEMP] FROM rsTmp;"
DoCmd.RunSQL Qry
str_sql = "DROP TABLE TEMP;"
CurrentDb.Execute str_sql
End Sub
"In three words I can sum up everything I've learned about life: it goes on."
- Robert Frost 1874-1963