If IsNull(CusID) Or IsNull(Me.CusID) Then
Beep
MsgBox "Specify a Customer or enter CustomerID to proceed", vbCritical
CusID.SetFocus
End If
If IsNull(paymenttype) Or IsNull(Me.paymenttype) Then
Beep
MsgBox "Please specify payment type", vbCritical
paymenttype.SetFocus
End If
If IsNull(payment) Or IsNull(Me.payment) Then
Beep
MsgBox "Please enter any amount to proceed payment.", vbCritical
payment.SetFocus
End If
如果有人帮助我将这些if语句放入if else ....请逐步检查if语句的操作。这是来自表单名称'付款',然后我需要确保在继续付款之前,这些文本框都不为空或空;请帮助
答案 0 :(得分:1)
你的意思是以下几点吗?:
If IsNull(CusID) Or IsNull(Me.CusID) Then
Beep
MsgBox "Specify a Customer or enter CustomerID to proceed", vbCritical
CusID.SetFocus
ElseIf IsNull(paymenttype) Or IsNull(Me.paymenttype) Then
Beep
MsgBox "Please specify payment type", vbCritical
paymenttype.SetFocus
ElseIf IsNull(payment) Or IsNull(Me.payment) Then
Beep
MsgBox "Please enter any amount to proceed payment.", vbCritical
payment.SetFocus
End If
的“If”之前添加了“Else”