S1LV3RF0X87
Registered User.
- Local time
- Today, 01:28
- Joined
- Jul 7, 2017
- Messages
- 26
Hi All
I hope you can help me with a problem that i have struggled with for the past few weeks. I have searched the web and all i can find is people talking about corruption and nothing that helps my situation.
I have an access database running in office 365 that has been split into two ends one end for my tables and the other end for my queries and forms. I have then created an accde file from the front end to allow multiple users into the database at once. This works fine with no issues.
My problem has recently cropped up when combining some coding that i have done with some new code i seem to get the following issue that crops up.
"The expression On Click you entered as the event property setting produced the following error: The command or action 'PasteAppend' isn't available now."
For the life of me i cannot figure out why i seem to be getting this or how to resolve it. I have however managed to drill down and find the cause of this but the answer to why it is doing it still eludes me.
I have a shutdown timer on my main form which has been working perfectly fine until i introduced this new code which is on a separate form. This separate form is where i experience the issue.
Here is the code i run which generates this issue;
Now when the error happens the debugger pops up and highlights the following section;
I cannot seem to figure out the reason for it.
However when i remove the On Timer function from my main form and then retry the above code it works perfectly.
Some how i cannot seem to have this code run in line with the shut down function of the database after an X amount of time has passed.
Any thoughts or ideas of what i need to do with this would be appreciated.
I hope you can help me with a problem that i have struggled with for the past few weeks. I have searched the web and all i can find is people talking about corruption and nothing that helps my situation.
I have an access database running in office 365 that has been split into two ends one end for my tables and the other end for my queries and forms. I have then created an accde file from the front end to allow multiple users into the database at once. This works fine with no issues.
My problem has recently cropped up when combining some coding that i have done with some new code i seem to get the following issue that crops up.
"The expression On Click you entered as the event property setting produced the following error: The command or action 'PasteAppend' isn't available now."
For the life of me i cannot figure out why i seem to be getting this or how to resolve it. I have however managed to drill down and find the cause of this but the answer to why it is doing it still eludes me.
I have a shutdown timer on my main form which has been working perfectly fine until i introduced this new code which is on a separate form. This separate form is where i experience the issue.
Here is the code i run which generates this issue;
Code:
Private Sub Command1849_Click()
If MsgBox("Are you sure you want to process a tariff change against this job order?", vbYesNo + vbQuestion) = vbYes Then
Me.Deactivate = True
Me.Deactivation_Date = ""
Me.Deactivation_Date = Date
Me.Deactivation_Reason = ""
Me.Deactivation_Reason = "Tariff Change"
Me.Deactivated_By = ""
Me.Deactivated_By = Me.Deactivated_By & Environ("username") & Me.Deactivated_By
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdCopy
DoCmd.RunCommand acCmdPasteAppend
Me.Deactivate = False
Me.FulfilledDate = ""
Me.ContractTermMonths = 1
Me.OrderStatus = ""
Me.OrderStatus = 1
Me.ContractType = "Resign Business"
Else
End If
End Sub
Now when the error happens the debugger pops up and highlights the following section;
Code:
DoCmd.RunCommand acCmdPasteAppend
I cannot seem to figure out the reason for it.
However when i remove the On Timer function from my main form and then retry the above code it works perfectly.
Some how i cannot seem to have this code run in line with the shut down function of the database after an X amount of time has passed.
Any thoughts or ideas of what i need to do with this would be appreciated.