Copy Data Definition Query to another database

  • Thread starter Thread starter WonderingWhy
  • Start date Start date
W

WonderingWhy

What copies fine? What code doesn't travel? How did
you "copy" this?

To move a macro (and I am assuming you do mean macro and
not a VBA module), try selecting what you want to export
highlight the item you wish to export, then File:Export...
from the Access menu.

If you mean that the associated sql doesn't copy (i.e. you
get the macro moved but not the query), you have to also
export the sql query. Just like you export the macro. And
note that if the tables are needed they will also have to
be exported.

Hope this helps.
-----Original Message-----
I have sql specific code that creates a field in a
table. I want to copy the macro that runs this sql-
specific query to another database. It copies fine, but
the code doesn't travel with it.
 
Thanks, "Wondering". I solved it by tucking a "runsql" command in a macro that I copied over rather than copying over the macro that runs the query. This is command line stuff, not click-through. The copying is going on because I need to convert an Access97 database to Access 2002 and run an alter table statement on the new version of the database. The macros cannot be in the Access97 database (I can't alter the database unless I convert it and this is going to be an automated routine for hundreds of users, not a click-through, hands-on thing.

I appreciate your taking the time to answer

Lesle

----- WonderingWhy wrote: ----

What copies fine? What code doesn't travel? How did
you "copy" this

To move a macro (and I am assuming you do mean macro and
not a VBA module), try selecting what you want to export
highlight the item you wish to export, then File:Export...
from the Access menu

If you mean that the associated sql doesn't copy (i.e. you
get the macro moved but not the query), you have to also
export the sql query. Just like you export the macro. And
note that if the tables are needed they will also have to
be exported

Hope this helps
-----Original Message----
I have sql specific code that creates a field in a
table. I want to copy the macro that runs this sql
specific query to another database. It copies fine, but
the code doesn't travel with it
 
Back
Top