how to transfer a table from one access database to another

hi

how can i transfer a table from one database to another (for backup reasons)  with a different name like example "table1_backup071415"

thanks
bill201Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PatHartmanCommented:
If the target database already exists, you can use DoCmd.TransferDatabase.  Intellisense should give you what you need for syntax.  If not, help will.

DoCmd.TransferDatabase acExport, , "C:\mydestinationdatabase.accdb", acTable, "sourcetablename", "destinationtablename", False, True
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Rey Obrero (Capricorn1)Commented:
you can create a make table query like this

select tablename.* into table1_backup071415 IN 'C:\Folder1\Folder2\backup.accdb'
from tablename;
1
bill201Author Commented:
thanks a lot
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

bill201Author Commented:
but both codes don't work
0
bill201Author Commented:
PatHartman i get this error message
run time error 2507
the type isn't installed database type or doesn't support the operation you chose.

Rey Obrero (capricorn1) i get an error message run time error 3067
query inpurt must contain at least one table or query
0
Rey Obrero (Capricorn1)Commented:
post the SQL of your query
0
bill201Author Commented:
select table1.* into table1_backup071415 IN q:\backup1.accdb
from table1;
0
Rey Obrero (Capricorn1)Commented:
does backup1.accdb exists?

try enclosing the destination in quote 'q:\backup1.accdb'

select table1.* into table1_backup071415 IN 'q:\backup1.accdb'
 from table1;
1
bill201Author Commented:
thanks Rey now it's working
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.