J
jon
Hi
I am getting the above error with the code below.
I don't know what to do but basically the user is asked to confirm and if
they cancel it stops the code so they can correct the error.
Can some explain what I am doing wrong as well a bit of the logic behind the
cancel.
Thanks
Jon
If Me![FreeStatePassFail] = 0 Then
blnok = confirm(" Are You sure the Job has Failed?")
If blnok = -1 Then
DisplayMessage ("oh shit")
Me![CmbFreeStsteStatus] = 4
Me![ChkFreeststateDone] = -1
Set db = CurrentDb()
Set rst = db.OpenRecordset("ComponentNos", dbOpenTable)
With rst
rst.Index = "Componet No"
rst.Seek "=", [CmbJob]
.Edit
.Fields("FreeStateCount") = 0
.Fields("FreeStatePassCount") = 0
.Update
End With
Else
Form.Cancel *** error on this line
End If
End If
I am getting the above error with the code below.
I don't know what to do but basically the user is asked to confirm and if
they cancel it stops the code so they can correct the error.
Can some explain what I am doing wrong as well a bit of the logic behind the
cancel.
Thanks
Jon
If Me![FreeStatePassFail] = 0 Then
blnok = confirm(" Are You sure the Job has Failed?")
If blnok = -1 Then
DisplayMessage ("oh shit")
Me![CmbFreeStsteStatus] = 4
Me![ChkFreeststateDone] = -1
Set db = CurrentDb()
Set rst = db.OpenRecordset("ComponentNos", dbOpenTable)
With rst
rst.Index = "Componet No"
rst.Seek "=", [CmbJob]
.Edit
.Fields("FreeStateCount") = 0
.Fields("FreeStatePassCount") = 0
.Update
End With
Else
Form.Cancel *** error on this line
End If
End If