PC Review Forums Newsgroups Microsoft Access Microsoft Access VBA Modules ~TMPCLP

Reply

~TMPCLP

 
Thread Tools Rate Thread
Old 11-03-2005, 05:13 AM   #1
=?Utf-8?B?TXVycA==?=
Guest
 
Posts: n/a
Default ~TMPCLP


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

--
Yo Yo Ma.
  Reply With Quote
Old 11-03-2005, 05:48 AM   #2
Jeff Conrad
Guest
 
Posts: n/a
Default Re: ~TMPCLP

"Murp" <Murp@discussions.microsoft.com> wrote in message
news:E0BEB657-8AB0-45E7-8EA9-B6EBE4C1791E@microsoft.com...

> 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.

--
Jeff Conrad
Access Junkie
Bend, Oregon


  Reply With Quote
Old 11-03-2005, 09:23 AM   #3
=?Utf-8?B?SmFSYQ==?=
Guest
 
Posts: n/a
Default Re: ~TMPCLP

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


"Jeff Conrad" wrote:

> "Murp" <Murp@discussions.microsoft.com> wrote in message
> news:E0BEB657-8AB0-45E7-8EA9-B6EBE4C1791E@microsoft.com...
>
> > 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.
>
> --
> Jeff Conrad
> Access Junkie
> Bend, Oregon
>
>
>

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off