I have a database that I recently published to SharePoint. Before I published to SharePoint, everything seemed to be working as was meant to. However, after I published it, the database started having issues with updating information within the table because of the field I designated as an "Index" or "Unique" value. I have this indexed value because I don't want there to be multiples of the same record (which seems to happen when I uncheck the "Index" box). If the box is left unchecked then there will be a new (but same) record entered under a different ID. Here is the code that I have:
Private Sub cmdSaveRecord_Click()
Dim rst As DAO.Recordset
Dim strMsg As String
Set rst = CurrentDb.OpenRecordset("tblECLUData")
If DCount("ID", "tblECLUData", "ClaimNumber = '" & Me.cboFind.value & "'") = 0 Then 'record does not exist
rst![State] = Me.txtState
rst![ClaimNumber] = Me.txtClaimNumber
rst![ClaimStatus] = Me.cboClaimStatus
rst![ECLUAnalyst] = Me.cboLITRep
rst![ECLUMgmt] = Me.cboECLUMgmt
rst![Plaintiff] = Me.txtIns
rst![ReportType] = Me.cboRptType
rst![LitAssoc] = Me.cboLitAssoc
rst![AsgmntRec] = Me.txtAsgmntRec
rst![ClmFileSent] = Me.txtClmFileSnt
rst![LitAnalystCal] = Me.txtLitAnalystCal
rst![AsgmntClo] = Me.txtAsgmntClosed
rst![TMDiaryDate] = Me.txtDiary
rst![DteDue] = Me.txtDteDue
rst![DteComplete] = Me.txtDteComplete
Set rst = Nothing
strMsg = "Data successfully entered into database."
MsgBox strMsg, vbOKOnly, "Entry Successful"
I should say that, if this is the first time that some is adding the information to the table then it works fine, but, if they try to update the information from the form, then Error 3899 comes up: "The list item could not be inserted or updated because duplicate values were found for one or more fields in the list."
Any help would be appreciated. Thanks.