Saving an access database...

  • Thread starter Thread starter J S
  • Start date Start date
J

J S

Is there way to programmatically save an entire access database? Or do I
have to go through each form, report, modules, etc and save them one by one?
 
J said:
Is there way to programmatically save an entire access database? Or do I
have to go through each form, report, modules, etc and save them one by one?


It's a really bad idea to try to copy an open file. This
should be done outside the db by first making sure the file
is closed and then copying the mdb file.
 
I'm sorry I didn't mean save the database to a separate file, I meant save
all changes to the database.

Maybe I can clarify my problem a little bit.

I have the access database open (which contains frontend and backend).
I then have ado code that attempts to connect to the database, this works
fine UNLESS I've been writing some vba code in access. In which case I will
get the following error.

"The database has been placed in a state by user 'Admin' on machine
'mycomputer' that prevents it from being opened or locked."

I assumed that this problem was caused by the fact that I had unsaved
changes in the database and that if I could figure out a way to
programmatically save the database if it was open then this problem would go
away.
 
I'm sorry, but I have never seen that issue, probably
because I don't use ADO. I mistook your question to be
something else altogether.

Maybe someone else has an idea that might help.
 
See my 5:41 PM response to your earlier post.

Marshall said:
I'm sorry, but I have never seen that issue, probably
because I don't use ADO. I mistook your question to be
something else altogether.

Maybe someone else has an idea that might help.
--
Marsh
MVP [MS Access]

J said:
I'm sorry I didn't mean save the database to a separate file, I meant save
all changes to the database.

Maybe I can clarify my problem a little bit.

I have the access database open (which contains frontend and backend).
I then have ado code that attempts to connect to the database, this works
fine UNLESS I've been writing some vba code in access. In which case I will
get the following error.

"The database has been placed in a state by user 'Admin' on machine
'mycomputer' that prevents it from being opened or locked."

I assumed that this problem was caused by the fact that I had unsaved
changes in the database and that if I could figure out a way to
programmatically save the database if it was open then this problem would go
away.
 
J S said:
Is there way to programmatically save an entire access database? Or do I
have to go through each form, report, modules, etc and save them one by one?

You could try going into the VBA Code page - Alt F11 - and using File, Save

This will probably meet your requirements in saving all your latest changes.

Ian Millward
 
Back
Top