Hello,
I have the code below. It used to work but now for some reason access breaks when running with error code 2486, "You can't carry out this action at present time.".
Any assistance is greatly appreciated!
Thank you!
-Al
I have the code below. It used to work but now for some reason access breaks when running with error code 2486, "You can't carry out this action at present time.".
Code:
Private Sub btn_archive_Click()
Dim objAcc As Object
Dim objAcc2 As Object
Dim filename As String
filename = InputBox(prompt:="Type your file name here.")
If Len(filename) = 0 Then
MsgBox "No file name chosen"
Exit Sub
End If
Set objAcc = New Access.Application
objAcc.OpenCurrentDatabase ("P:IBA Delinquency DB Data.accdb")
objAcc.DoCmd.CopyObject "P:IBA Delinquency DB Archive.accdb", filename, acTable, "tl_delinquency"
objAcc.CloseCurrentDatabase
Set objAcc = Nothing
MsgBox ("Your data has been archived, " & filename & "!")
Thank you!
-Al
Comment