Results 1 to 3 of 3
  1. #1
    jeuda is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Oct 2014
    Posts
    2

    Want to run this code on machine with runtime only. but got runtime error

    Hi all, I want to use this code on a pc installed with ms access 2013 runtime only but it came up with runtime error.

    But it worked fine on full ms access 2013 office with nil error.
    I did found out that the error arose from DeleteObject.

    Can I use buttons to delete table from runtime?
    Or is any limitation to use VBA code on a runtime-based machine?

    Private Sub Command6_Click()


    DoCmd.SetWarnings False
    DoCmd.Rename "Attendanceout", acTable, "Attendance"
    DoCmd.TransferDatabase acExport, "Microsoft Access", CurrentDb.Name, acTable, "Attendanceout", "Attendance", StructureOnly:=True
    DoCmd.DeleteObject acTable, "Attendanceout"
    DoCmd.SetWarnings True
    MsgBox "Attendance Erased! Kindly Return to Menu & Append New Session Details"
    End Sub

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    Runtime may not allow for delete tables.
    BUT you should never delete tables anyway...you should empty them and refill them with append queries.

  3. #3
    jeuda is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Oct 2014
    Posts
    2
    Quote Originally Posted by ranman256 View Post
    Runtime may not allow for delete tables.
    BUT you should never delete tables anyway...you should empty them and refill them with append queries.
    Hi there, I am new to VBA. How should I empty a table?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Runtime 2467 only on a Win 7 Machine
    By ilikebirds in forum Forms
    Replies: 3
    Last Post: 12-11-2012, 03:58 PM
  2. Replies: 6
    Last Post: 09-20-2012, 04:22 PM
  3. Replies: 13
    Last Post: 06-12-2012, 09:52 PM
  4. Replies: 1
    Last Post: 10-04-2011, 02:39 PM
  5. A2007 Runtime on same machine as A2003
    By jhollingsh615 in forum Access
    Replies: 4
    Last Post: 05-24-2011, 12:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums