D
Doojinsi
Hi,
This query, to backup my People table --
INSERT INTO People_BACKUP SELECT * FROM People;
works fine. But when I run it from a button in VB code on
a form like this --
Set DB = CurrentDb()
SQL_STMT = "INSERT INTO " & "People_BACKUP" & _
" SELECT * FROM " & "People" & ";"
DB.Execute (SQL_STMT)
SQL_STMT = ""
Set CURRENT_RS = DB.OpenRecordset ("People_BACKUP") 'DAO!
COUNT_OF_ROWS = CURRENT_RS.RecordCount
CURRENT_RS.Close
Set CURRENT_RS = Nothing
MsgBox "People_BACKUP contains " & COUNT_OF_ROWS & _
" records"
It actually displays the number of records in the
recordset but when I exit the form and examine the list of
tables, People_BACKUP is not there. Why would this be?
Dooj--
This query, to backup my People table --
INSERT INTO People_BACKUP SELECT * FROM People;
works fine. But when I run it from a button in VB code on
a form like this --
Set DB = CurrentDb()
SQL_STMT = "INSERT INTO " & "People_BACKUP" & _
" SELECT * FROM " & "People" & ";"
DB.Execute (SQL_STMT)
SQL_STMT = ""
Set CURRENT_RS = DB.OpenRecordset ("People_BACKUP") 'DAO!
COUNT_OF_ROWS = CURRENT_RS.RecordCount
CURRENT_RS.Close
Set CURRENT_RS = Nothing
MsgBox "People_BACKUP contains " & COUNT_OF_ROWS & _
" records"
It actually displays the number of records in the
recordset but when I exit the form and examine the list of
tables, People_BACKUP is not there. Why would this be?
Dooj--