Can you import objects via code?

D

DRT

I am trying to create a form in MS Access that works similar to Windows
Update (i.e. will check the version of a local form / report and, if
different, will delete it from the local database and then import from a
master). I can get the form to delete using 'DeleteObject' but cannot find
the equivalent command for import ... any suggestions?
 
A

Andrew Tapp

You could try the DoCmd.CopyObject [destinationdatabase][, newname][,
sourceobjecttype][, sourceobjectname] method.

Hope this helps.
 
A

Andrew Tapp

Actually the DoCmd.TransferDatabase [transfertype], databasetype,
databasename[, objecttype], source, destination[, structureonly][,
saveloginid] may be of more help as it allows you to import from a database.

Hope this helps.
 
J

Jeff Boyce

Another approach, rather than swapping objects in and out of an Access file,
is to swap the entire Access file out and replace it with an updated
version.

That way, any (and all) changes you've made (and tested) will be
available...

Good luck

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
D

DRT

Thanks all for the response, should be able to get something working now :)

Andrew Tapp said:
Actually the DoCmd.TransferDatabase [transfertype], databasetype,
databasename[, objecttype], source, destination[, structureonly][,
saveloginid] may be of more help as it allows you to import from a database.

Hope this helps.

DRT said:
I am trying to create a form in MS Access that works similar to Windows
Update (i.e. will check the version of a local form / report and, if
different, will delete it from the local database and then import from a
master). I can get the form to delete using 'DeleteObject' but cannot find
the equivalent command for import ... any suggestions?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top