Group:  Microsoft Access ยป microsoft.public.access.formscoding
Thread: Error 2105

Geek News

Error 2105
JohnLute 12/16/2008 3:13:01 PM
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!

--
www.Marzetti.com
Re: Error 2105
"Dirk Goldgar" <dg[ at ]NOdataSPAMgnostics.com.invalid> 12/16/2008 5:05:01 PM
"JohnLute" <JohnLute[ at ]discussions.microsoft.com> wrote in message
news:4FFD7C32-5403-43FE-859F-C81DEA75E488[ at ]microsoft.com...
[Quoted Text]
> 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.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

Re: Error 2105
JohnLute 12/16/2008 8:00:16 PM
[Quoted Text]
> 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
Re: Error 2105
"Dirk Goldgar" <dg[ at ]NOdataSPAMgnostics.com.invalid> 12/16/2008 8:42:06 PM
"JohnLute" <JohnLute[ at ]discussions.microsoft.com> wrote in message
news:5280089B-9825-4F3C-A245-B9C439A22D60[ at ]microsoft.com...
[Quoted Text]
>> 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.


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.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

Re: Error 2105
JohnLute 12/16/2008 10:08:01 PM
"Dirk Goldgar" wrote:

[Quoted Text]
> 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.
Re: Error 2105
"Dirk Goldgar" <dg[ at ]NOdataSPAMgnostics.com.invalid> 12/16/2008 10:41:57 PM
"JohnLute" <JohnLute[ at ]discussions.microsoft.com> wrote in message
news:861ADB1F-C2FA-44C7-9859-F2FD240ADBAE[ at ]microsoft.com...
[Quoted Text]
>
>> 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.

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.

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

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net