PC Review


Reply
Thread Tools Rate Thread

Copy external to local database -- Access 2000

 
 
L.A. Lawyer
Guest
Posts: n/a
 
      22nd Jun 2005
I want to copy objects (eg, forms, queries, modules, etc.) from an external
database (clients.mdb) to the current database: I do want the external
objects to replace the current database's objects of the same name and to do
this without user involvement.

How is that done?


 
Reply With Quote
 
 
 
 
Douglas J. Steele
Guest
Posts: n/a
 
      22nd Jun 2005
AFAIK, you can't make Access replace the objects. You'll have to determine
the name of each object, delete it if it already exists, then import it.

You can use TransferDatabase to do the actual transfer, but you'll need to
use Automation to inspect the name of each object in the source database.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"L.A. Lawyer" <(E-Mail Removed)> wrote in message
news:eHE0O$(E-Mail Removed)...
>I want to copy objects (eg, forms, queries, modules, etc.) from an external
> database (clients.mdb) to the current database: I do want the external
> objects to replace the current database's objects of the same name and to
> do
> this without user involvement.
>
> How is that done?
>
>



 
Reply With Quote
 
L.A. Lawyer
Guest
Posts: n/a
 
      23rd Jun 2005
Ok, I will program it to delete the local objects, which is no big deal
since DoCmd.DeleteObject is pretty straightforward.

Now, how do I reference and copy the external objects to the active
database? I see that I can do DoCmd.CopyCbject, but I don't know how to
reference these named objects (queries, modules, forms, etc.) in that
command. For example, how would I reference a form called "People" in an
another mdb file named "All Clients"?


"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:OvZD#(E-Mail Removed)...
> AFAIK, you can't make Access replace the objects. You'll have to determine
> the name of each object, delete it if it already exists, then import it.
>
> You can use TransferDatabase to do the actual transfer, but you'll need to
> use Automation to inspect the name of each object in the source database.
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
>
> "L.A. Lawyer" <(E-Mail Removed)> wrote in message
> news:eHE0O$(E-Mail Removed)...
> >I want to copy objects (eg, forms, queries, modules, etc.) from an

external
> > database (clients.mdb) to the current database: I do want the external
> > objects to replace the current database's objects of the same name and

to
> > do
> > this without user involvement.
> >
> > How is that done?
> >
> >

>
>



 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      23rd Jun 2005
As I said before, use the TransferDatabase method:

DoCmd.TransferDatabase acImport, "Microsoft Access", _
"C:\DBS\All Clients.mdb", acForm, "People", _
"People"

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"L.A. Lawyer" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Ok, I will program it to delete the local objects, which is no big deal
> since DoCmd.DeleteObject is pretty straightforward.
>
> Now, how do I reference and copy the external objects to the active
> database? I see that I can do DoCmd.CopyCbject, but I don't know how to
> reference these named objects (queries, modules, forms, etc.) in that
> command. For example, how would I reference a form called "People" in an
> another mdb file named "All Clients"?
>
>
> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
> news:OvZD#(E-Mail Removed)...
>> AFAIK, you can't make Access replace the objects. You'll have to
>> determine
>> the name of each object, delete it if it already exists, then import it.
>>
>> You can use TransferDatabase to do the actual transfer, but you'll need
>> to
>> use Automation to inspect the name of each object in the source database.
>>
>> --
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no e-mails, please!)
>>
>>
>>
>> "L.A. Lawyer" <(E-Mail Removed)> wrote in message
>> news:eHE0O$(E-Mail Removed)...
>> >I want to copy objects (eg, forms, queries, modules, etc.) from an

> external
>> > database (clients.mdb) to the current database: I do want the external
>> > objects to replace the current database's objects of the same name and

> to
>> > do
>> > this without user involvement.
>> >
>> > How is that done?
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
David C. Holley
Guest
Posts: n/a
 
      23rd Jun 2005
Why not just open the database in which the objects reside?

Douglas J. Steele wrote:
> As I said before, use the TransferDatabase method:
>
> DoCmd.TransferDatabase acImport, "Microsoft Access", _
> "C:\DBS\All Clients.mdb", acForm, "People", _
> "People"
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert into the local access table from the external database Jun Microsoft Access 2 3rd Nov 2006 09:28 PM
how do i copy an access 2000 database format without the data? =?Utf-8?B?Z3JlZ2xpc2FzbQ==?= Microsoft Access 1 27th Aug 2005 08:17 PM
Transfer from external Microsoft Access 2000 database =?Utf-8?B?QmlsbCBTdGFubGV5?= Microsoft Access External Data 1 4th Sep 2004 03:24 AM
protect against copy access 2000 database RO|_F Microsoft Access Security 1 4th Jun 2004 03:07 PM
How make a Transaction when I copy records from SqlServer to Access 2000 Database Ismail Demiralp Microsoft Access 0 27th Feb 2004 02:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:22 AM.