Go Back   Access World Forums > Microsoft Access Discussion > General

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 08-06-2013, 06:58 AM   #1
JCorreia
Newly Registered User
 
Join Date: May 2013
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
JCorreia is on a distinguished road
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!

JCorreia is offline   Reply With Quote
Old 08-06-2013, 07:23 AM   #2
Trevor G
Newly Registered User
 
Trevor G's Avatar
 
Join Date: Oct 2009
Location: Tamworth, Staffordshire
Posts: 2,331
Thanks: 4
Thanked 229 Times in 219 Posts
Trevor G will become famous soon enough Trevor G will become famous soon enough
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"
__________________
Trevor
I am on a learning curve of life, I know a little but like to share what I have learnt with others.
I am using Microsoft Office 2003 To 2016
Please remember everyone here is a volunteer, so if you have had a reply to your thread be courteous and acknowledge this.
Trevor G is offline   Reply With Quote
Old 08-06-2013, 07:27 AM   #3
pr2-eugin
Super Moderator
 
pr2-eugin's Avatar
 
Join Date: Nov 2011
Location: Bournemouth, UK
Posts: 8,498
Thanks: 68
Thanked 2,067 Times in 2,014 Posts
pr2-eugin has a spectacular aura about pr2-eugin has a spectacular aura about pr2-eugin has a spectacular aura about
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..

__________________
Regards,
Paul Eugin

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
!
!
Windows 7 Professional, MS Access 2010
---------------------------------------------------------------------------------------------------------------------
If the above post has helped you, please click the scales
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
or click the 'Thumbs up'. Cheers.

---------------------------------------------------------------------------------------------------------------------



pr2-eugin is offline   Reply With Quote
Old 08-06-2013, 07:45 AM   #4
JCorreia
Newly Registered User
 
Join Date: May 2013
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
JCorreia is on a distinguished road
Re: Copy Database with No Records

Ah, of course Trevor, should have thought of that.
I keep forgetting KISS.
Thank you very much.
JCorreia is offline   Reply With Quote
Old 08-06-2013, 08:20 AM   #5
pr2-eugin
Super Moderator
 
pr2-eugin's Avatar
 
Join Date: Nov 2011
Location: Bournemouth, UK
Posts: 8,498
Thanks: 68
Thanked 2,067 Times in 2,014 Posts
pr2-eugin has a spectacular aura about pr2-eugin has a spectacular aura about pr2-eugin has a spectacular aura about
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..

__________________
Regards,
Paul Eugin

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
!
!
Windows 7 Professional, MS Access 2010
---------------------------------------------------------------------------------------------------------------------
If the above post has helped you, please click the scales
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
or click the 'Thumbs up'. Cheers.

---------------------------------------------------------------------------------------------------------------------



pr2-eugin is offline   Reply With Quote
Reply

Tags
blank , copy , export , internship , share

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy table from one database to another(current) database with data, indexes and keys ramindya Modules & VBA 1 05-17-2012 12:09 AM
create copy of database then link tables from another database kfschaefer Modules & VBA 0 05-20-2011 12:47 PM
“Nested” copy and paste facility for related sub-records and sub-sub-records Big Pat Modules & VBA 1 08-03-2010 02:04 PM
Question Splitting Database (backup copy) effects (orginal copy) Joe8915 General 3 07-14-2009 12:06 PM
Copy a database CarlM1975 Modules & VBA 1 10-31-2008 01:16 AM




All times are GMT -8. The time now is 03:12 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


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