how to export Access 2010 data macros

后端 未结 5 1481
醉酒成梦
醉酒成梦 2020-12-06 06:54

I need to transfer Access data macros from my test db to my production db. Anybody know how to do that?

I know that transferring tables from one accdb to another wi

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-06 07:42

    I don't have a great answer here.

    However, in the past I often made a "log book" of changes to tables and then simple used that on site.

    Do note that you can cut + paste macro code. And the code saves as XML.

    For example, this after update table trigger looks like this in Access:

    enter image description here

    If you cut out the above (ctrl-a, ctrl-cc),, then you can paste that into a note pad. In fact you can even paste/open it in visual studio or any xml editor, and you see this:

    enter image description here

    So you can cut + paste out of those macros.

    As noted, thus in the past I often kept a "log" of changes.

    So if I was working off site and I modified 2 code modules, 4 forms and 2 reports, then I had a little log of changes. I would type into this sheet what object was changed.

    When I get on site, then I quick glance at that sheet and I know to import the 3-5 objects and such a import is only a few minutes tops.

    However, with table triggers and store procedures, you could have more then just a few to copy.

    I would either do one of two things:

    Use the log idea and

    a) Un-publish the development version and bring that with me to your working site. You then import new forms, reports etc. For trigger code, you cut + paste between the two applications.

    b) When you make a change to a trigger, then cut + paste into a note pad doc and place them in a directory. When on site, simply take each notepad, cut + paste into production and then move or copy the notepad item into a "done" folder.

    The above is certainly less than ideal. Then again in the past I not always had code to script out a table change, and using a little log sheet worked quite well.

    So in the past I often just written down that such and such table was modified and I have to add such and such column.

    So it really your choice as to if you want to cut + paste out the macro code as xml into separate little documents, or cut + paste right out of development into production.

    I do think if you working in differnt location, then I think it likely best to un-publish the development version, and bring that with you (I assume you know/realaize that you can make a un-published copy of a web application).

    So the forms, code modules, macro's etc can just be imported rather easy (you delete the forms etc, and just import from that un-published copy).

    However, for the table code? You have to cut + paste from that un-published copy one at a time into some staging area, or as noted cut + paste between the applications.

    There is the possibility that save-as text might work here, but I not yet had the time to cook up a better solution.

    Edit: By the way, in above I assumed a web services database, but the advice still applies to non web Access databases.

提交回复
热议问题