Hello
I have a database that when it opens it populates a "cache" table with 'Sensitie Information'
The problem is when the database is closed (using a quit button) it is necessary to delete the contents of the table. The table is stored locally but the database is split.
I wrote a procedure that deletes the contents of the table but when I go to open the database again it crashes!
The code for this routine is...
Public Function DelTable()
Dim rs1 As Recordset
Set rs1 = CurrentDb.OpenRecordset("cache"
If Not rs1.EOF And Not rs1.BOF Then
rs1.MoveFirst
Do While Not rs1.EOF
rs1.Delete
rs1.MoveNext
Loop
Else
MsgBox "You have already deleted the table", vbInformation
End If
rs1.Close
Set rs1 = Nothing
End Function
Does anyone know of a better way of doing this?
Thanks in advance
jameshall
I have a database that when it opens it populates a "cache" table with 'Sensitie Information'
The problem is when the database is closed (using a quit button) it is necessary to delete the contents of the table. The table is stored locally but the database is split.
I wrote a procedure that deletes the contents of the table but when I go to open the database again it crashes!
The code for this routine is...
Public Function DelTable()
Dim rs1 As Recordset
Set rs1 = CurrentDb.OpenRecordset("cache"
If Not rs1.EOF And Not rs1.BOF Then
rs1.MoveFirst
Do While Not rs1.EOF
rs1.Delete
rs1.MoveNext
Loop
Else
MsgBox "You have already deleted the table", vbInformation
End If
rs1.Close
Set rs1 = Nothing
End Function
Does anyone know of a better way of doing this?
Thanks in advance
jameshall