Hello.
I have a problem with the edit in a form.
My issue is related the allowedit. It seems that the allowedit=false on the current event don't change.
I tried to remove it and the code in CmdIstanza_Click works well (change caption etc).
Could you please help me?
Thank you
I have a problem with the edit in a form.
Private Sub Form_Current()
Me.AllowEdits = False
If IsNull(Me.ANNO_ISTANZA) Then
Me.CmdIstanza.Caption = "New Document"
Else
Me.CmdIstanza.Caption = "Modify Document"
End If
End Sub
Private Sub CmdIstanza_Click()
Dim scelta As String
If Me.PDF_created = "S" Then
MsgBox "The document is completed, you cannot edit it."
Exit Sub
Else
Me.AllowEdits = True
If Me.CmdIstanza.Caption = "New Document" Then
scelta = MsgBox("Do you want create a new document?", vbOKCancel)
If scelta = vbOK Then
Me.Year_Document = Year - 1
Me.CmdIstanza.Caption = "Modify Document"
Me.Requery
Else
Exit Sub
End If
Else
Me.AllowEdits = True
End If
End If
Me.Requery
End Sub
My issue is related the allowedit. It seems that the allowedit=false on the current event don't change.
I tried to remove it and the code in CmdIstanza_Click works well (change caption etc).
Could you please help me?
Thank you