Svet, you may be interested that Custom properties can be used to persist settings with the MDB. Here is some code I am using for this:
Public Function SetCustomProperty(strPropName As String, intPropType _
As Integer, vntPropValue As Variant) As Boolean
Dim dbs As Database, cnt As...
Svet, I tried repair/compact on the corrupted Access 2000 MDB in question and it did not work.
(Compile button enabled, click does not produce compile errors, button does not become disabled after click, indicating project still not compiled.)
Kade Larsen
Excuse me for butting in, but Rewdee, it sounds like you're looking on the main Access application menu bar, not the Visual Basic environment menu bar.
Open Visual Basic environment using Tools/Macro/Visual Basic Editor (Alt+F11). Then look on the "Tools" menu in the Visual Basic...
Update: I cleaned up the code and resolved several problems.
First, the above code only works when the MDB is opened fresh and the form is opened the first time. After that, an error occurs on the line getting the Undo CommandBarButton:
Set mcmdUndo =...
It works! (sort of...) I created the class module "clsCBEvents" with the following code:
Private mfrmNotify As Form
Private WithEvents mcmdUndo As Office.CommandBarButton
Public Sub InitEvents(frmNotify As Form)
Set mfrmNotify = frmNotify
Set mcmdUndo =...
Update: I was able to invoke a procedure when the "Undo" button is clicked on the toolbar, and when Ctrl-Z is pressed using an AutoKeys.^z macro. There's an obscure way to customize the "OnAction" property of menu items and toolbar buttons by right-clicking on the button...
Thanks for the feedback! I already have code in the change events for two comboboxes and one textbox. There is no change event for the form. The change events for the controls do not get invoked when the user chooses "Undo."
You're right about code behind the button. Right now...
I have read that Access 2002 has an "Undo" event for forms as well as for controls. Access 2000 does not support this feature. However, I am investigating any possible back-door methods of implementing this functionality.
The problem: I have a form based on a single table with a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.