purple_chicken
New member
- Local time
- Today, 15:33
- 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
the purple chcken
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
