Error 2105

J

JohnLute

This error is returning on occasion. I believe it's due to my code being
faulty:

Private Sub Form_Load()
If Me.OpenArgs = "New" Then
DoCmd.GoToRecord acDataForm, Me.Name, acNewRec
End If

End Sub

Does anybody see what's wrong?

Thanks!
 
D

Dirk Goldgar

JohnLute said:
This error is returning on occasion. I believe it's due to my code being
faulty:

Private Sub Form_Load()
If Me.OpenArgs = "New" Then
DoCmd.GoToRecord acDataForm, Me.Name, acNewRec
End If

End Sub

Does anybody see what's wrong?


I'm assuming you only get the error when OpenArgs = "New", but that even
then it doesn't happen all the time. Is that correct?

The most likely cause would be that the form or its recordsource query
doesn't allow additions. Does that make sense in the context where it's
happening? Unless you are changing the form's AllowAdditions property or
its RecordSource in the Open event, I wouldn't expect the GoToRecord
statement to work sometimes and fail others.
 
J

JohnLute

I'm assuming you only get the error when OpenArgs = "New", but that even
then it doesn't happen all the time. Is that correct?

Hi, Dirk! That's correct. I'm actually working on setting up a small
application for multiple users. Some users have been experiencing this error
but not all the time. Other users never get it.

BTW this application has a few elements of my "monster" database. I was
thinking today that this smaller app *should* be converted to a web app - AND
- if it so it would be a great platform for my monster app.
The most likely cause would be that the form or its recordsource query
doesn't allow additions. Does that make sense in the context where it's
happening?

I don't think so. I was just logged in at the same time as another user who
is located in another city. She was entering data and when I refreshed the
form her data was there. Absolutely no issues.
Unless you are changing the form's AllowAdditions property or
its RecordSource in the Open event, I wouldn't expect the GoToRecord
statement to work sometimes and fail others.

Is it perhaps my button code clashing with the form...?
Private Sub OpenComplaints_Click()
On Error GoTo Err_OpenComplaints_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmComplaints"
DoCmd.OpenForm stDocName, , , stLinkCriteria, , , "New"

Exit_OpenComplaints_Click:
Exit Sub

Err_OpenComplaints_Click:
MsgBox Err.Description
Resume Exit_OpenComplaints_Click

End Sub
 
D

Dirk Goldgar

JohnLute said:
Hi, Dirk! That's correct. I'm actually working on setting up a small
application for multiple users. Some users have been experiencing this
error
but not all the time. Other users never get it.

BTW this application has a few elements of my "monster" database. I was
thinking today that this smaller app *should* be converted to a web app -
AND
- if it so it would be a great platform for my monster app.


I don't think so. I was just logged in at the same time as another user
who
is located in another city. She was entering data and when I refreshed the
form her data was there. Absolutely no issues.


Hmm. How are you sharing this database? Is this a split database, with the
back-end on a server and a separate copy of the front-end for each user?
Are they using it over a local network? You refer to a user in another
city; is she accessing the database via terminal services or Citrix, or
what?

I suspect that your problem may be due to a sharing or permissions problem,
but don't yet have enough information to say. If not all users have full
permissions on the back-end folder, then some users may be locking the file
for others, and possibly resulting in a "read-only" experience for them.
 
J

JohnLute

Dirk Goldgar said:
Hmm. How are you sharing this database? Is this a split database, with the
back-end on a server and a separate copy of the front-end for each user?

Yes. I've just finished working with 7 people who are at 7 different
locations. I'm in Columbus and one person in Cleveland loaded the FE on two
machines and entered data while I was logged in with no problems. Same with
another person located in Massachusetts. No problems with our Iowa and
Alabama facilities, either.

The problem is occurring with another local facility and two others located
in California and Kentucky.
Are they using it over a local network?
WAN.

You refer to a user in another
city; is she accessing the database via terminal services or Citrix, or
what?

I need to research everyone's hardware configurations. They seem to be the
logical culprits.
I suspect that your problem may be due to a sharing or permissions problem,
but don't yet have enough information to say. If not all users have full
permissions on the back-end folder, then some users may be locking the file
for others, and possibly resulting in a "read-only" experience for them.

There are only two types of users: Full Data and Admins. I'm the only admin.
All others open the db with the same username and password. I was logged in
as this generic name while others were logged in, too. No problems. I was
logged in as myself while others were logged in as the generic username - no
problems.

I've been working with so many different people today that perhaps my mind
isn't clear on that last comment. I need to re-confirm that tomorrow.
 
D

Dirk Goldgar

JohnLute said:
I need to research everyone's hardware configurations. They seem to be the
logical culprits.

Unless they are using some form of terminal services, that is going to be
not only slow, but problematic. Access does not perform well over a WAN.
Using terminal services, Access is actually running only on the server, so
that's okay. But if you are just using normal networking over the WAN, I
would expect problems. Please check on the way this is set up.
There are only two types of users: Full Data and Admins. I'm the only
admin.
All others open the db with the same username and password. I was logged
in
as this generic name while others were logged in, too. No problems. I was
logged in as myself while others were logged in as the generic username -
no
problems.

I think you're talking about workgroup-based permissions as establiched by
user-level security. I was talking about Windows permissions, something
completely different. Users need Windows permissions to create, update, and
delete files in the back-end folder. If they don't have them, Access can't
create and manage the lock file (.ldb) and so has to lock the whole database
file. This leads to permissions problems for other users.
 

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