Design only copy of Access database

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

Is there an 'easy' way to create a Design-Only copy of an Access database?
In other words, I don't want to bring over any data, just
tables/forms/queries/etc. I know that you can: 1) copy and paste the whole
..mdb file and then open each table and delete all rows, or 2) create a new
database, and copy and name each design element (and for the tables choose
'Design Only'). I want to distribute this database w/ NO data to my data
entry people, but with all Design elements intact.

Thank you.
 
Hello,

Is there an 'easy' way to create a Design-Only copy of an Access database?
In other words, I don't want to bring over any data, just
tables/forms/queries/etc. I know that you can: 1) copy and paste the whole
.mdb file and then open each table and delete all rows, or 2) create a new
database, and copy and name each design element (and for the tables choose
'Design Only'). I want to distribute this database w/ NO data to my data
entry people, but with all Design elements intact.

Thank you.

this are two posibilities

with 1 use:
sub ReadyForDelivery()
dim tbl as dao.tabledef
dim db as dao.database
for each tbl in db.tabledefs
if left(tbl.name,4)<>"MSys" then
db.execute "DELETE * FROM " &tbl.name
endif
next tbl
set tbl =nothing
set db=nothing
end sub
 
Pat said:
Hello,

Is there an 'easy' way to create a Design-Only copy of an Access
database? In other words, I don't want to bring over any data, just
tables/forms/queries/etc. I know that you can: 1) copy and paste the
whole .mdb file and then open each table and delete all rows, or 2)
create a new database, and copy and name each design element (and for
the tables choose 'Design Only'). I want to distribute this database
w/ NO data to my data entry people, but with all Design elements
intact.

Thank you.

Import all objects into a new blank file and in the options area of the
import dialog specify "Structure only" for the tables.
 
Andi Mayer said:
this are two posibilities

with 1 use:
sub ReadyForDelivery()
dim tbl as dao.tabledef
dim db as dao.database
for each tbl in db.tabledefs
if left(tbl.name,4)<>"MSys" then
db.execute "DELETE * FROM " &tbl.name
endif
next tbl
set tbl =nothing
set db=nothing
end sub

Unfortunately, if you've set Referential Integrity, that may not work,
because you might be trying to delete rows from the Parent table while there
are still rows in the Child table.

(As well, you forgot to instantiate db)
 
Back
Top