M
Maracay
Hi Guys,
I am getting this message when I am modifying the data, there is no way
someone else is using the file because I haven’t split the data base yet.
I will really appreciate if someone may help me with this.
“The data has been changed.
Another user edited this record and saved the changes before you attempted
to save your changes
Re-edit the recordâ€
Press OK
This is the code
Private Sub CommSaveData_Click()
Dim rs As Recordset
Dim db As Database
Set db = CurrentDb
Set rs = db.OpenRecordset( _
"select MaterialNumber, MaterialData, MaterialDataComments,
MaterialInk, MaterialInkComments, " & _
"MaterialPoly, MaterialPolyComments, MaterialVideo,
MaterialVideoComments, " & _
"MaterialLake, MaterialLakeComments, MaterialTabbing,
MaterialTabbingComments, " & _
"MaterialCollater, MaterialCollaterComments,
MaterialInsMaster, MaterialInsMasterComments, " & _
"MaterialInsReg, MaterialInsRegComments, MaterialLaser,
MaterialLaserComments, " & _
"MaterialFolding, MaterialFoldingComments, MaterialManual,
MaterialManualComments, " & _
"MaterialOther, MaterialOtherComments, MaterialStartDate,
MaterialDropDate, MaterialComments, MaterialQuantity " & _
"from tblDMaterial " & _
"where MaterialNumber = " & Me.TextMaterNumb & " and
MaterialSequence = " & Me.TextSequenceNumber)
If rs.RecordCount = 1 Then
'Nota tengo que grabar en tblMMaterial
' Save Material tblDMaterial
rs.Edit
' rs!MaterialNumber = Me.TextMaterialNumber
rs!MaterialStartDate = Me.TextStartDate
rs!MaterialDropDate = Me.TextDropDate
rs!MaterialComments = Me.TextMaterialNotes
rs!MaterialQuantity = Me.TextQuantity
rs!MaterialData = Me.CheckData
rs!MaterialDataComments = Me.TextDataComments
rs!MaterialInk = Me.CheckInkjet
rs!MaterialInkComments = Me.TextInkjetComments
rs!MaterialPoly = Me.CheckPoly
rs!MaterialPolyComments = Me.TextPolyComments
rs!MaterialVideo = Me.CheckVideo
rs!MaterialVideoComments = Me.TextVideoComments
rs!MaterialLake = Me.CheckLake
rs!MaterialLakeComments = Me.TextLakeComments
rs!MaterialTabbing = Me.CheckTabbing
rs!MaterialTabbingComments = Me.TextTabbingComments
rs!MaterialCollater = Me.CheckCollater
rs!MaterialCollaterComments = Me.TextCollaterComments
rs!MaterialInsMaster = Me.CheckInsMaster
rs!MaterialInsMasterComments = Me.TextInsMasterComments
rs!MaterialInsReg = Me.CheckInsReg
rs!MaterialInsRegComments = Me.TextInsRegComments
rs!MaterialLaser = Me.CheckLaser
rs!MaterialLaserComments = Me.TextLaserComments
rs!MaterialFolding = Me.CheckFolding
rs!MaterialFoldingComments = Me.TextFoldingComments
rs!MaterialManual = Me.CheckManual
rs!MaterialManualComments = Me.TextManualComments
rs!MaterialOther = Me.CheckOther
rs!MaterialOtherComments = Me.TextOtherComments
rs.Update
MsgBox " Record was updated "
Else
MsgBox " Record no found "
End If
rs.Close
Set rs = Nothing
Set db = Nothing
End Sub
I am getting this message when I am modifying the data, there is no way
someone else is using the file because I haven’t split the data base yet.
I will really appreciate if someone may help me with this.
“The data has been changed.
Another user edited this record and saved the changes before you attempted
to save your changes
Re-edit the recordâ€
Press OK
This is the code
Private Sub CommSaveData_Click()
Dim rs As Recordset
Dim db As Database
Set db = CurrentDb
Set rs = db.OpenRecordset( _
"select MaterialNumber, MaterialData, MaterialDataComments,
MaterialInk, MaterialInkComments, " & _
"MaterialPoly, MaterialPolyComments, MaterialVideo,
MaterialVideoComments, " & _
"MaterialLake, MaterialLakeComments, MaterialTabbing,
MaterialTabbingComments, " & _
"MaterialCollater, MaterialCollaterComments,
MaterialInsMaster, MaterialInsMasterComments, " & _
"MaterialInsReg, MaterialInsRegComments, MaterialLaser,
MaterialLaserComments, " & _
"MaterialFolding, MaterialFoldingComments, MaterialManual,
MaterialManualComments, " & _
"MaterialOther, MaterialOtherComments, MaterialStartDate,
MaterialDropDate, MaterialComments, MaterialQuantity " & _
"from tblDMaterial " & _
"where MaterialNumber = " & Me.TextMaterNumb & " and
MaterialSequence = " & Me.TextSequenceNumber)
If rs.RecordCount = 1 Then
'Nota tengo que grabar en tblMMaterial
' Save Material tblDMaterial
rs.Edit
' rs!MaterialNumber = Me.TextMaterialNumber
rs!MaterialStartDate = Me.TextStartDate
rs!MaterialDropDate = Me.TextDropDate
rs!MaterialComments = Me.TextMaterialNotes
rs!MaterialQuantity = Me.TextQuantity
rs!MaterialData = Me.CheckData
rs!MaterialDataComments = Me.TextDataComments
rs!MaterialInk = Me.CheckInkjet
rs!MaterialInkComments = Me.TextInkjetComments
rs!MaterialPoly = Me.CheckPoly
rs!MaterialPolyComments = Me.TextPolyComments
rs!MaterialVideo = Me.CheckVideo
rs!MaterialVideoComments = Me.TextVideoComments
rs!MaterialLake = Me.CheckLake
rs!MaterialLakeComments = Me.TextLakeComments
rs!MaterialTabbing = Me.CheckTabbing
rs!MaterialTabbingComments = Me.TextTabbingComments
rs!MaterialCollater = Me.CheckCollater
rs!MaterialCollaterComments = Me.TextCollaterComments
rs!MaterialInsMaster = Me.CheckInsMaster
rs!MaterialInsMasterComments = Me.TextInsMasterComments
rs!MaterialInsReg = Me.CheckInsReg
rs!MaterialInsRegComments = Me.TextInsRegComments
rs!MaterialLaser = Me.CheckLaser
rs!MaterialLaserComments = Me.TextLaserComments
rs!MaterialFolding = Me.CheckFolding
rs!MaterialFoldingComments = Me.TextFoldingComments
rs!MaterialManual = Me.CheckManual
rs!MaterialManualComments = Me.TextManualComments
rs!MaterialOther = Me.CheckOther
rs!MaterialOtherComments = Me.TextOtherComments
rs.Update
MsgBox " Record was updated "
Else
MsgBox " Record no found "
End If
rs.Close
Set rs = Nothing
Set db = Nothing
End Sub