问题
Well, I know, there is a difference between VBA-macros and non-VBA-macros in Access.
Creating and editing of VBA-macros is not very different from Word/Excel: you have a text field, where you can write your code:
But what about editing of non-VBA-macros? For me, it looks like "programming using a mouse-clicking" (for me, as for the new guy in Access, it looks very weird):
Questions:
Is it a common and correct way to edit non-VBA-macros in Access "using a mouse"? Or, probably, there is another way, like shown on the 1st image?
If I have an embedded (as opposed to standalone) non-VBA-macro, how I can copy it from one database to another (or, to Stack Overflow)?
回答1:
Non-VBA macros should probably not be manually edited.
You can copy the AXL by opening the macro, using Ctrl + A, Ctrl + C, and then pasting it to a text file. This is mainly useful for sharing a macro, because others can paste it, as outlined here: To paste a macro from Stack Overflow into Access.
You can copy and paste the AXL of normal, embedded and data macros. Note that data macros use a different set of functions than normal macros, and the availability differs per event. Normal and embedded macros are compatible.
You can, of course, edit the AXL. But as far as I know, there's no way to edit it from Access, and there's no validation outside of XML validation.
回答2:
Note that you can convert an Access Macro into its equivalent Visual Basic code using the Convert Macros to Visual Basic
option present on the Tools
panel of the Macro Tools
Design
contextual ribbon tab:
This will result in the creation of a VBA Module similar to what may be created when you record a Macro in MS Excel or MS Word.
回答3:
You can copy a macro from one database to another in the same was as with any other object in Access.
External Data -> New Data Source -> From Database -> Access -> Import
来源:https://stackoverflow.com/questions/49585786/how-to-edit-and-copy-non-vba-macros