Error 3045; File already in use

G

Guest

I am building an Access database. In this database I wrote a function that
returns values from a table in the database. If I open the database in
exclusive mode, I can edit and save the form the function is on, but the
function returns the error "3045; File already in use". If I open the
database normally (shared mode), the function works properly, but noe I
cannot edit the forms design. Any assistance would be greatly appreciated.
 
T

Tim Ferguson

=?Utf-8?B?QnJ1Y2UgQ2FvdWV0dGUsIEpyLg==?= <Bruce Caouette,
(e-mail address removed)> wrote in
If I open the database in exclusive mode, I can edit and save the form
the function is on, but the function returns the error "3045; File
already in use". If I open the database normally (shared mode), the
function works properly, but noe I cannot edit the forms design.

First of all, if you split the database so that the forms, reports,
modules, etc are in one mdb and all the tables are in the other, it will
make this kind of maintenance much easier.

Second, what is the function doing? Is it opening a new connection or
database object that references the same database? If so, the quick fix
would be just to replace the call with a reference to CurrentProject or
CurrentDB().

Thirdly, you should be able to modify a form in shared mode, as long as
no-one else is actually using the same form at the time. If this is a
problem, see the first answer!

All the best


Tim F
 

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

Similar Threads


Top