This procedure will transfer a table definition plus data from one database to another. Manually copying objects such as tables, forms, reports, modules etc from one database to another database is simple but unnecessary and time consuming. This can be achieved quickly with these few lines of code. This code is used in MAARS implementation. Feel to free use it in your own program, however, please give proper credit to the MAARS team.
Public Sub TransferATableStructureAndDataToAnotherDB(srcTableName As String, destTableName As String, _
destDbFullPath As String)
'Export only the table definition to the destination database
If Dir(destDbFullPath) <> "" Then
DoCmd.TransferDatabase acExport, "Microsoft Access", destDbFullPath, acTable, srcTableName, destTableName, False
End If
End Sub
This is a complimentary article written by the MAARS team for the MAARS user community. Code in this article drives the operation of MAARS (MS Access Application wRiting Software). MAARS is an intelligent automation program that speeds up MS Access Application Development by 10x, 20x or 100x times. To learn more about MAARS, click here.
Disclaimer:
Some information included in this article may have been sourced from other publicly available websites and blogs. In such cases, credit goes to those authors for the original ideas and thoughts, but we do take credit for putting valuable information together and improve the efficiency of other office developers.
Is there anyway to transfer the table definition only?
Yes, all you have to do is set the 7th parameter (StructureOnly) to True. Syntax for this call is –
Generally I don’t read post on blogs, but I would like to say that this write-up very forced me to try and do it! Your writing style has been amazed me. Thanks, very nice article.
It抯 really a great and useful piece of information. I am glad that you just shared this useful information with us. Please stay us up to date like this. Thank you for sharing.
Thanks! I am glad you found the information helpful.
Hey there! I’m at work browsing your blog from my new iphone 3gs! Just wanted to say I love reading your blog and look forward to all your posts! Keep up the superb work!
Thanks for the feedback!
Woah! I’m really enjoying the template/theme of this blog. It’s simple, yet effective. A lot of times it’s hard to get that “perfect balance” between user friendliness and appearance. I must say you have done a fantastic job with this. Additionally, the blog loads super fast for me on Opera. Excellent Blog!
Hi:
Thanks for your positive feedback on the site. Honestly, I have not been very active maintaining it (other priorities in life got on the way). I have been getting a lot of similar feedback like yours, so I plan to become more active. Please let me know if I can help with anything.
Thank you for writing this post!
Thanks for this web site post, I enjoyed it’s content and style. I stumbled upon this web site on the internet and now possess added this in order to my personal favourites features checklist. I’ll be certain to come again soon.
Very usefull blog. i will follow this blog. keep up the good work.
I would like to consider the ability of thanking you for that professional guidance I have often enjoyed checking out your site. I’m looking forward to the particular commencement of my college research and the entire prep would never have been complete without dropping by your site. If I may be of any assistance to others, I’d personally be glad to help as a result of what I have gained from here.
Thanks a large amount just for this particular information. I clearly cherished reading it and have to share it with my local freinds.
Outstanding brief which post helped me alot. Give you thanks I looking for your details?–.
I absolutely agree with everything you have explained. In reality, I browsed throughout your additional content articles and I do think that you’re completely correct. Great job with this website.
Hi. best wishes to you and your very nice blog,
Wow, incredible blog layout! How long have you been blogging for? you made blogging look easy. The overall look of your web site is great, let alone the content!
This is actually the kind of information I have been trying to find. Thank you for writing this information.
I’m very happy to read this. This is the type of manual that needs to be given and not the accidental misinformation that’s at the other blogs. Appreciate your sharing this greatest doc.
Hi my loved one! I want to say that this article is amazing, great written and include almost all vital infos. I would like to peer more posts like this .
Hello! I wish to provide a large thumbs up for the fantastic info you have here within this post. I will be coming back to your site for additional soon.
This is great! I think reading this, I loved every word. Seriously, keep posting the good information, bloggers like myself need it.
Wow! I’m genuinely enjoying this template-style for the website. It is very simple, yet effective. Very often it’s very difficult to obtain the ideal between superb usability as well as visual appeal. I actually may state that you’ve done a excellent job with this. Additionally, the website loads very quick personally upon Chrome. Outstanding Site…
You actually make it seem so easy with your presentation but I find this topic to be actually something that I think I would never understand. It seems too complex and very broad for me. I’m looking forward for your next post, I’ll try to get the hang of it!
I got what you mean, appreciate it for putting up. Woh I am lucky to find this website through google.
Nice post. I understand some thing much harder on various blogs everyday. Most commonly it is stimulating to study content off their writers and use a little something from their site. I’d prefer to apply certain with all the content on my small blog regardless of whether you don’t mind. Natually I’ll give you a link on your internet weblog. Thanks for sharing.