473,394 Members | 1,642 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Create Empty Access DB From an Existing Access DB

I have a production access application with no development environment. We need to create a develoment access environment with an empty db. We are not allowed to see the production data. How do I create a template of the existing db and then use it to create my development environment
Jul 19 '07 #1
6 2157
NeoPa
32,556 Expert Mod 16PB
This all really depends on what you mean by "with no development environment".
If it's not an MDB file and you don't have the MDB file it was created from, then it appears that someone has made a grand faux-pas.
Is that what you're trying to say?
Jul 19 '07 #2
This all really depends on what you mean by "with no development environment".
If it's not an MDB file and you don't have the MDB file it was created from, then it appears that someone has made a grand faux-pas.
Is that what you're trying to say?

I do have a MDB file. It has my production forms and data. I can copy it over to the development world. I just need a way of deleting all of the data but keep the tables.
Jul 20 '07 #3
NeoPa
32,556 Expert Mod 16PB
Clearing the data from a single table is simple enough :
Expand|Select|Wrap|Line Numbers
  1. DELETE
  2. FROM [TableName]
You can apply a WHERE clause too if you want to keep any of it.
Jul 20 '07 #4
NeoPa
32,556 Expert Mod 16PB
The following code should be used with caution. Do it only on the copied version.
Expand|Select|Wrap|Line Numbers
  1. Public Sub ClearAll()
  2.   Dim tblThis As TableDef
  3.   Dim strSQL As String
  4.  
  5.   For Each tblThis In CurrentDb.TableDefs
  6.     With tblThis
  7.       If Left(.Name, 4) <> "MSys" Then
  8.         strSQL = Replace("DELETE FROM [%T]", "%T", .Name)
  9.         Call DoCmd.RunSQL(strSQL, False)
  10.       End If
  11.     End With
  12.   Next tblThis
  13. End Sub
Jul 20 '07 #5
NeoPa
32,556 Expert Mod 16PB
Please let us know how well this works for you, or if you come across any Cascaded-Delete type issues.
Jul 20 '07 #6
nico5038
3,080 Expert 2GB
Just a warning, first check or the tables aren't linked !

Just open the table in design mode and when there's no warning that you can't change the definition, it's OK.
Linked tables also have an icon with a black arrow.

Nic;o)
Jul 20 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Max | last post by:
Hello everyone, and thank you in advance for all of your help! I have a tblPrint table in Access 2002. Its structure is as follows: tblPrint ------------------ Name, Text Address1, Text...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
1
by: deko | last post by:
DoCmd.CopyObject copies data, but I only need structure. I'm trying to clone several tables in my Access 2003 mdb. The goal is to link to a series of Excel spreadsheets and then run various...
5
by: Jacob | last post by:
Happy New Year! I'm writing a program that will need to store large amounts of data from several DataSets that I create at runtime (for information like email, calendar, etc...). The trick is...
9
by: Peter | last post by:
Hello£¬everyone, My program will collect a testing machine's data ,save the data and deal with the data everyday. I want to use vb.net to create database, add and delete tables or modify the...
23
by: sandy | last post by:
I need (okay, I want) to make a dynamic array of my class 'Directory', within my class Directory (Can you already smell disaster?) Each Directory can have subdirectories so I thought to put these...
27
by: max | last post by:
Hello, I am a newbye, and I'm trying to write a simple application. I have five tables with three columns; all tables are identical; I need to change some data in the first table and let VB...
15
by: Killer42 | last post by:
Hi all. Ok, I'm using VB6 but I think the answer to this (if there is one) is more likely to be found in the Access forum. I have a situation where I've got tens of millions of records, spread...
13
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
I want to create a new column in a datatable from two existing columns. I have no problem to create the new column using the datatable.columns.add method. The problem is the value of the new...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.