Saving an access database...

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

J S

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.
 
M

Marshall Barton

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.
 
J

John Spencer (MVP)

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.
 
I

Ian Millward

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top