how to transfer a table from one access database to another


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

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.

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

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;
bill201Author Commented:
thanks a lot
Get a highly available system for cyber protection

The Acronis SDI Appliance is a new plug-n-play solution with pre-configured Acronis Software-Defined Infrastructure software that gives service providers and enterprises ready access to a fault-tolerant system, which combines universal storage and high-performance virtualization.

bill201Author Commented:
but both codes don't work
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
Rey Obrero (Capricorn1)Commented:
post the SQL of your query
bill201Author Commented:
select table1.* into table1_backup071415 IN q:\backup1.accdb
from table1;
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;
bill201Author Commented:
thanks Rey now it's working
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.