You do not have exclusive access to the database at this time....

D

David Anderson

I am developing an Access 2000 application that is split into a front end
and a back end and makes use of User-Level Security. The whole thing will be
distributed to several users, who will each run it independently on their
own PCs (ULS is only exploited to enable identification of the user and
trigger some user-specific code).

When testing on my own PC, if I logon as one of the other users I get the
following error message,
"You do not have exclusive access to the database at this time. If you
proceed to make changes, you may not be able to save them later".
Am I right in thinking that I can ignore this warning, on the basis that my
users will never see it? If I wanted to trap this error, perhaps to
substitute my own error text, how would I do it? I'm familiar with error
trapping in form event code, but this error is triggered when the database
is opened, not by a form.

For reasons I do not yet understand, this error message never occurred a
couple of days ago, when I was testing user logons in an earlier version of
my application....

David
 
D

Douglas J. Steele

The error message may be due to your code making (and trying to save) a
design change to the database.

If all you're using ULS for is to enable identification of the user, could
you not just determine their network login Id and use it, thus saving
yourself a lot of work? See http://www.mvps.org/access/api/api0008.htm at
"The Access Web" for sample code.
 
D

David Anderson

Doug,
There is no network. My users will be running this app on their own PCs at
home.

The only code that runs prior to this error is a fairly straightforward
switchboard form (there was something else that I have temporarily disabled,
but this did not prevent the error). I'm not aware of anything in the
switchbord form's code that could be described as "making (and trying to
save) a design change to the database". Can you please give me an example of
the sort of design change you had in mind.

David
 
D

Douglas J. Steele

Doesn't matter that there's no network. They have to provide a user name
when they log onto the machine, don't they?

Look for code that sets form properties (colour, font, etc.), especially if
based on who the user is.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


David Anderson said:
Doug,
There is no network. My users will be running this app on their own PCs at
home.

The only code that runs prior to this error is a fairly straightforward
switchboard form (there was something else that I have temporarily
disabled, but this did not prevent the error). I'm not aware of anything
in the switchbord form's code that could be described as "making (and
trying to save) a design change to the database". Can you please give me
an example of the sort of design change you had in mind.

David
 
D

David Anderson

As far as I am aware, there is no compulsion to have a user logon process on
a Windows XP machine. For example, I normally logon as administrator to my
main desktop PC, but my laptop requires no such logon (not perhaps an ideal
security scenario but that's the way it is at present!).

I'll have a closer look at the switchboard form, but there has been little
or no change to it since the time when logging on as another user did NOT
trigger the error.

David
 
D

David Anderson

I've just disabled ALL event-driven code on my switchboard form and there is
no AutoExec macro. As far as I can see, there is now no code of my creation
that runs when the database is opened. However, logging on as another user
still triggers that error message.

David
 
D

Douglas J. Steele

Sorry, I have no idea what's generating the message in that case.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


David Anderson said:
I've just disabled ALL event-driven code on my switchboard form and there
is no AutoExec macro. As far as I can see, there is now no code of my
creation that runs when the database is opened. However, logging on as
another user still triggers that error message.

David
 
D

David Anderson

I've fixed it. I went into 'Tools/Security/User and Group Permissions' and
then gave Open Exclusive permission on the Database object to the main user
group I had previously created. Job done - no more irritating messages.

David
 

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