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