Cannot edit or re-save an existing event-driven Data Macro in Access 2010

前端 未结 1 722
野性不改
野性不改 2020-12-07 05:39

(This is a follow-up to an answer from an earlier question here.)

I have an Access 2010 database file containing a table with a Before Change Data Macro

相关标签:
1条回答
  • 2020-12-07 05:55

    I think the issue is the table alias. If you open the table out in layout mode (just open the table NOT in design mode). You then get this:

    enter image description here

    You can now edit the macro freely (such as expand an action) and then save the macro.

    I suspect this is an un-intended bug since if the table is opened in design mode then the table is locked and the macro cannot get/check verify the SQL used in the lookup command.

    Note that if you JUST PLACE the table name in the macro designer then you have NO problem and this is what 99% of people do in this case.

    Most most don't know you can free hand type in SQL here!!!

    Upon save the designer attempts to verify the SQL against the table – but the table is locked in design mode. So in a round about way, this is a bug, but few encounter it due to few typing in SQL into that lookup record command.

    I would as noted just open up the table by clicking on it and not use design mode to make changes. And note in the above screen shot how the event buttons are separate buttons and easier to hit then when opening table in design mode.

    Note that in order to edit the Data Macros directly from Datasheet view the database must have the "Enable design changes for tables in Datasheet view" option enabled:

    dbOptions.png

    If that option is not set then the Data Macro buttons are disabled in Datasheet view.

    0 讨论(0)
提交回复
热议问题