R
Raul Sousa
If the field DocId as any data I want the user to be able to print a report.
If the field DocId the user will not have the option to print.
I have built the above code.
The problem is that it acts as if DocId was never empty. Not even in a new
record, with any data.
Private Sub Form_Close()
Dim strMsg As String
If Not IsEmpty(Me.DocID) Then
strMsg = "Deseja imprimir o documento?"
If MsgBox(strMsg, vbQuestion + vbYesNo, "Impressão") = vbYes Then
DoCmd.OpenReport "Factura", acViewNormal, "", "", acNormal
End If
End If
End Sub
I can’t understand why. Can anyone help me?
If the field DocId the user will not have the option to print.
I have built the above code.
The problem is that it acts as if DocId was never empty. Not even in a new
record, with any data.
Private Sub Form_Close()
Dim strMsg As String
If Not IsEmpty(Me.DocID) Then
strMsg = "Deseja imprimir o documento?"
If MsgBox(strMsg, vbQuestion + vbYesNo, "Impressão") = vbYes Then
DoCmd.OpenReport "Factura", acViewNormal, "", "", acNormal
End If
End If
End Sub
I can’t understand why. Can anyone help me?