Link to home
Create AccountLog in
Avatar of FrankRam
FrankRam

asked on

VBA Import all database objects

Hi Experts,


is there a way to import all objects (forms and reports only) from one ms access database to another ms access database.

Frank
Avatar of prasmin
prasmin
Flag of India image

You have to following following:

1.  Create the Target Database with ADOX object
2.  The Create Table to Target DB and copy table by table.

ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of FrankRam
FrankRam

ASKER

Hi LSMConsulting:

what about when report 1 is in database a
and export report 1 into database b

it will not replace it it will add a 1 after the report name
is there a way to have it replace it
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account

I using an adp, i can add in the dao reference
however I don't think ms access adp has msysobjects

I think i am pushing it.
"I using an adp"
You stated in your original post:
<from one ms access database to another ms access database.>
...This implies an MDB file to most Access experts...

I am not sure ADP files have an equivalent to MsysObjects table, ... perhaps LSM would know...
None of the suggestions above involve MSysObjects. I'm not sure how that's relevant. An ADP file still contains Forms, Reports, etc, and you can still work with Containers and Documents.

boag2000 suggested using a dcount on msysobjects to determine if an object already exists

"An ADP file still contains Forms, Reports, etc, and you can still work with Containers and Documents."

Thanks Scott, I was unaware of how ADP's handled the containers

I will be working on this today

very interested in trying the container script from LSM
I will award points once i am done

thanks
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.