Go Back   Access World Forums > Microsoft Access Discussion > General

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 09-05-2019, 05:35 PM   #1
imsuneaik
Newly Registered User
 
Join Date: Sep 2019
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
imsuneaik is on a distinguished road
Duplicating DB from existing DB

Hi everyone,
I would like to create a new fresh database (same objects, without data) from the original one. While ctrl c + ctrl v works for the objects, I realised that relationships can't be copied in this manner. Using the inbuilt import function causes all datas to be copied in as well, together with the relationships.

May I know how do I go about this issue? Thanks in advance!

imsuneaik is offline   Reply With Quote
Old 09-05-2019, 05:49 PM   #2
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 5,881
Thanks: 57
Thanked 1,286 Times in 1,267 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: Duplicating DB from existing DB

Hi. Welcome to AWF! There are several ways you can approach this. For example, you could simply create a copy of the DB and give it a new name. Then, simply delete all the data manually, using code, or a macro. You could also give the TransferDatabase method a try.
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is online now   Reply With Quote
Old 09-05-2019, 05:53 PM   #3
imsuneaik
Newly Registered User
 
Join Date: Sep 2019
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
imsuneaik is on a distinguished road
Re: Duplicating DB from existing DB

Quote:
Originally Posted by theDBguy View Post
Hi. Welcome to AWF! There are several ways you can approach this. For example, you could simply create a copy of the DB and give it a new name. Then, simply delete all the data manually, using code, or a macro. You could also give the TransferDatabase method a try.
Thank you for the reply. I am trying to first method, of deleting it manually. However, some of my tables are autonumbered, as a result the records will not start from 1 right?

imsuneaik is offline   Reply With Quote
Old 09-05-2019, 05:54 PM   #4
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 5,881
Thanks: 57
Thanked 1,286 Times in 1,267 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: Duplicating DB from existing DB

Quote:
Originally Posted by imsuneaik View Post
Thank you for the reply. I am trying to first method, of deleting it manually. However, some of my tables are autonumbered, as a result the records will not start from 1 right?
Don't worry about it. After you have deleted all the data, do a Compact & Repair as a final clean up process, and it will also reseed all Autonumber fields to one, provided the table is empty.
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is online now   Reply With Quote
Old 09-05-2019, 09:39 PM   #5
imsuneaik
Newly Registered User
 
Join Date: Sep 2019
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
imsuneaik is on a distinguished road
Re: Duplicating DB from existing DB

Quote:
Originally Posted by theDBguy View Post
Don't worry about it. After you have deleted all the data, do a Compact & Repair as a final clean up process, and it will also reseed all Autonumber fields to one, provided the table is empty.
Thank you. It works!
imsuneaik is offline   Reply With Quote
Old 09-05-2019, 09:41 PM   #6
isladogs
High Noon Moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 11,009
Thanks: 114
Thanked 3,014 Times in 2,741 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: Duplicating DB from existing DB

When you import tables from an external database, you can do so with the data or just import empty tables by selecting Definition Only in Options

Attached Images
File Type: png ImportNoData.PNG (15.3 KB, 37 views)

__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin (Mendip Data Systems)
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


"As we know, there are known knowns; there are things we know we know. We also know there are known unknowns; that is to say we know there are some things we do not know. But there are also unknown unknowns Ė the ones we don't know we don't know. It is the latter category that tend to be the difficult ones" Donald Rumsfeld
isladogs is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Export Query Data From Access into an Existing Workbook need to tweak existing code SunnyG Modules & VBA 2 09-21-2015 08:19 AM
Copying specific fields from one existing record to another existing record GraemeG Modules & VBA 7 10-15-2014 04:59 AM
Duplicating kumark Forms 2 07-10-2012 01:42 AM
DB Duplicating itself liddlem General 2 04-20-2009 09:25 PM
My Querie keeps duplicating Lucy02 General 5 11-25-2005 04:34 PM




All times are GMT -8. The time now is 10:30 AM.


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