Yeah figures, now I was so close to finishing this thing, now I get this error:
Write conflict
"This record has been changed by another user since you started editing it. If you save the record, you will overwrite the changes the other user made.
etc..."
I get three options: Save record,copy to clipboard, drop changes
All is ok if you press save record.But it's really annoying to always have to do that
I have the following code put behind a printbutton:
I have found the error I get to be number 7787, with a response of 1
PLz, help me.
I already tried it with a query and I get the same result as putting it in code.
And I really don't get it cause there is only one user at the moment
The form that the button is on is linked to table "facturen"
the report that is being printed is linked to a query which "facturen" is a part of.
Write conflict
"This record has been changed by another user since you started editing it. If you save the record, you will overwrite the changes the other user made.
etc..."
I get three options: Save record,copy to clipboard, drop changes
All is ok if you press save record.But it's really annoying to always have to do that
I have the following code put behind a printbutton:
Code:
Private Sub cmdFactAfruk_Click()
On Error GoTo Err_cmdFactAfruk_Click
Dim mijnrs As Object
'This is the one causing the problem, if I remove this, everything is fine
Set mijnrs = CurrentDb.OpenRecordset("SELECT * FROM facturen WHERE factuurnr = " & Me.factuurnr)
mijnrs.MoveFirst
mijnrs.Edit
mijnrs!datum = Me.datum
mijnrs!korting = Me.korting
mijnrs!betaalwijze = Me.betaalwijze
mijnrs!Betaalbaar = Me.Betaalbaar
mijnrs.Update
Set mijnrs = Nothing
If afgedrukt = False Then
DoCmd.SetWarnings False
DoCmd.OpenQuery "FArtikelsPreparatie", acViewNormal
DoCmd.SetWarnings True
End If
cmdCN.Enabled = True
'calls a printer dialog window I made
DoCmd.OpenForm "PrinterDialog", acNormal, , , , acDialog, "Fact"
Me.afgedrukt = True
Exit_cmdFactAfruk_Click:
Exit Sub
Err_cmdFactAfruk_Click:
MsgBox Err.Description
Resume Exit_cmdFactAfruk_Click
End Sub
I have found the error I get to be number 7787, with a response of 1
PLz, help me.
I already tried it with a query and I get the same result as putting it in code.
And I really don't get it cause there is only one user at the moment
The form that the button is on is linked to table "facturen"
the report that is being printed is linked to a query which "facturen" is a part of.
Last edited: