Access World Forums

Access World Forums (https://www.access-programmers.co.uk/forums/index.php)
-   General (https://www.access-programmers.co.uk/forums/forumdisplay.php?f=6)
-   -   Copy Database with No Records (https://www.access-programmers.co.uk/forums/showthread.php?t=251494)

JCorreia 08-06-2013 06:58 AM

Copy Database with No Records
 
Hi,
This summer I worked on a pretty extensive database for my internship and I'd like to be able to show recruiters the database as an example of my work (to get an interview, etc.). Of course, I can't just show them a copy of the database with all of the private information on it, so I'd like to be able to show them a copy of the database with no records. Is there a way to export/copy it so I can do this in Access 2007?
Thanks!

Trevor G 08-06-2013 07:23 AM

Re: Copy Database with No Records
 
Why not just copy the database and empty the tables of the data? You could also use some VBA code to empty the tables, here is an example of one line of code but you would then need to run this and add the additional lines for the other tables

DoCmd.RunSQL "DELETE * FROM TableName"

pr2-eugin 08-06-2013 07:27 AM

Re: Copy Database with No Records
 
Hello JCorreia, Have you had a look into DoCmd.TransferDatabase method? There is a StructureOnly attribute, which you can use..

JCorreia 08-06-2013 07:45 AM

Re: Copy Database with No Records
 
Ah, of course Trevor, should have thought of that.
I keep forgetting KISS.
Thank you very much.

pr2-eugin 08-06-2013 08:20 AM

Re: Copy Database with No Records
 
Trevor's method: Exporting Tables & Data-> Deleting Data -> (Essential) Compact & Repair
Paul's method: Exporting Table Structure -> (Optional) Compact & Repair

Which method is Keeping It Short? Nothing wrong following Trevor's method.. When you have some native function that can do everything in one go, why would you complicate things? It sure is your call at the end of the day, but just pointing out..


All times are GMT -8. The time now is 01:41 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World