Backup table data to new database

purple_chicken

New member
Local time
Today, 15:43
Joined
Mar 2, 2005
Messages
7
Probably a very simple solution but it's driving me mad as I can't get it to work

I have a small database with about 500 or so records in it which are very rarely likely to change,
basically what I want to do is create a command button that will backup all the records from the main table onto a floppy.

now the way ive been looking at it is for access to create an empty db then run a copyobject method to copy the table across
Deosn't work there seems to be a record locking problem.
here's the code

dim dbs as object
dim strdb as string
strdb = "A:\exportdb.mdb"
set appaccess = createobject("Access.Application")
appaccess.Newcurrentdatabase strdb
set dbs = appaccess.currentdb
appaccess.closecurrentdatabase
appaccess = nothing
docmd.copyobject "A:\exportdb", "exporttbl", actable, "maintbl"


can anyone help please?
thx
:confused: the purple chcken
 
As long as the table is just number/text/date fields it will probably be easier to just export the table as a CSV file directly to the Floppy, Smaller as well :)

Peter
 
Split the DB and just back up the tables to floppy
 
Not quite what I had in mind

not quite what I had in mind,
the database is pretty well tied up at the user end for computer eliterates,
basically i wanted to make things as easy as possible for them ie,
stick a blank floppy in,
hit backup then pop the floppy in the post to myself.
csv may be the way ahead if i can't get it into a seperate db.
rgds
 
Why does the backup table have to go into a mdb file? The file size will be much smaller if you export the table to a text file using the TransferText method. A floppy will only hold 1.4 megs of data. You can then import the text file into the db if a recovery is needed.

Search around for there are lots of backup methods posted in the forum.

These might interest you...

Back up and zip code from ghudson

Export All Database Objects Into Text Files

Searching for forum is a great way to discover and learn the answers to your Access programming questions!
 
Hey pl help....

I'm new to VBA...I have created 6 forms in ms access 2003 and also created the backend table.

I have also done the splitting of the database and split it into fe and be.

But, the major problem is...

Whenever I do any kind of form-filling....none of the data gets backed up in the tables. I don't know what to code in for modules...

pl pl pl help....
 

Users who are viewing this thread

Back
Top Bottom