~TMPCLP

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using Access 2002. I have noticed in my list of class modules that there
are a number of files names like Report_######~tmpclp. I am unable to delete
these files the usual way, and when I view their objects, they are old
versions of reports. Does anyone know why these files are appearing and how I
can get rid of them?

Cheers,
Murp
 
I am using Access 2002. I have noticed in my list of class modules that there
are a number of files names like Report_######~tmpclp. I am unable to delete
these files the usual way, and when I view their objects, they are old
versions of reports. Does anyone know why these files are appearing and how I
can get rid of them?

Compacting the database will *sometimes* get rid of them,
but not always.

Usually when this occurs, the only way to get rid of them is
to create a new blank database and import all the database
objects except those phantom temp objects into the new
container. Make sure you immediately compile the database
after importing the objects. Then compact.
 
You can also delete them with and Docmd.DeleteObject
this will delete temptables en debug.print other types so if you want you
can include them also for deletion.

- Raoul

Public Sub DeleteTempObjects()
Dim rs As DAO.Recordset
dim strSQL as string

strSQL="SELECT MSysObjects.Name, MSysObjects.Type "
strSQL=strSQL &"FROM MSysObjects "
strSQL=strSQL &"WHERE MSysObjects.Name Like '~sq_*' "
strSQL=strSQL &"ORDER BY MSysObjects.Name"
strSQL=Replace(strSQL,"'",chr(34))

Set rs = CurrentDb.OpenRecordset(strSQL)
While Not rs.EOF
Select Case rs("Type")
Case 5
DoCmd.DeleteObject acQuery, rs("Name")
Case Else
Debug.Print rs("Type"), rs("Name")
End Select
rs.MoveNext
Wend
rs.Close
Set rs = Nothing
End Sub
 
Back
Top