Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Posts
    300

    Unanswered: Trying to Delete TMP objects

    Option Compare Database
    DoCmd.DeleteObject acForm, "Form_~TMPCLP21541"
    DoCmd.DeleteObject acForm, "Form_~TMPCLP519071"
    DoCmd.DeleteObject acForm, "Form_~TMPCLP598461"
    DoCmd.DeleteObject acReport, "Report_~TMPCLP595641"
    End Sub

    I am trying to delete the temp files with this module I created, but get an error-- Invalid Outside Parameter.

    Can't figure it out.

  2. #2
    Join Date
    May 2010
    Posts
    601
    Quote Originally Posted by databasemon View Post
    Option Compare Database
    DoCmd.DeleteObject acForm, "Form_~TMPCLP21541"
    DoCmd.DeleteObject acForm, "Form_~TMPCLP519071"
    DoCmd.DeleteObject acForm, "Form_~TMPCLP598461"
    DoCmd.DeleteObject acReport, "Report_~TMPCLP595641"
    End Sub

    I am trying to delete the temp files with this module I created, but get an error-- Invalid Outside Parameter.

    Can't figure it out.
    If you are trying to "delete the temp files" or objects in the database?

    Your code is not complete. Where is the line that defines the sub?

    It should look something like this:

    Code:
    Option Compare Database
    Option Explicit
    
    Public Sub test()
    
    DoCmd.DeleteObject acForm, "Form_~TMPCLP21541"
    DoCmd.DeleteObject acForm, "Form_~TMPCLP519071"
    DoCmd.DeleteObject acForm, "Form_~TMPCLP598461"
    DoCmd.DeleteObject acReport, "Report_~TMPCLP595641"
    
    End Sub
    Boyd Trimmell aka HiTechCoach HiTechCoach.com (free access stuff)
    Microsoft MVP - Access Expert
    BPM/Accounting Systems/Inventory Control/CRM
    Programming: Nine different ways to do it right, a thousand ways to do it wrong.
    Binary--it's as easy as 1-10-11

  3. #3
    Join Date
    Nov 2003
    Posts
    300
    Thank you. This works.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •