Hi,
This question i hve asked in this forum already. They asked me to set Required property of field to Yes in Table design.
It was working fine. But, it is not convenient to me. So, I tried to put in the the below code which also allows me to stores the data.
--------------------
In the Command_Click() event..
Dim response
response = MsgBox("Are you sure want to Exit?", vbYesNo, "Payment Creation")
If response = vbYes Then
If IsNull([Paid_by_id]) Or IsNull([Received_by_id]) Or IsNull([Remarks]) Or IsNull(Form_Pay ment_Detail.Reg ion) Or IsNull(Form_Pay ment_Detail.Acc ount) Or IsNull(Form_Pay ment_Detail.Ven dor) Then
Me.Undo
DoCmd.Close acForm, "Payment_Creati on"
Else
End If
Else
End If
--------------------
Any idea..how to ignore to save the data...? ie., i should avoid to store if the data is incomplete.
Pls.suggest me.
Note : Form_Payment_De tail.Region is Subform control.
Thanks in advance.
ngr.
This question i hve asked in this forum already. They asked me to set Required property of field to Yes in Table design.
It was working fine. But, it is not convenient to me. So, I tried to put in the the below code which also allows me to stores the data.
--------------------
In the Command_Click() event..
Dim response
response = MsgBox("Are you sure want to Exit?", vbYesNo, "Payment Creation")
If response = vbYes Then
If IsNull([Paid_by_id]) Or IsNull([Received_by_id]) Or IsNull([Remarks]) Or IsNull(Form_Pay ment_Detail.Reg ion) Or IsNull(Form_Pay ment_Detail.Acc ount) Or IsNull(Form_Pay ment_Detail.Ven dor) Then
Me.Undo
DoCmd.Close acForm, "Payment_Creati on"
Else
End If
Else
End If
--------------------
Any idea..how to ignore to save the data...? ie., i should avoid to store if the data is incomplete.
Pls.suggest me.
Note : Form_Payment_De tail.Region is Subform control.
Thanks in advance.
ngr.
Comment