[英]If In VBA Access
嗨,大家好,我在下一個代碼上遇到了麻煩:
Private Sub btnRegistrar_Click()
If IsNull(txtNumeroActa) Then
MsgBox "Ingresar Número de Acta"
Me.txtNumeroActa.SetFocus
End If
ElseIf IsNull(txtNumeroActa) Then
MsgBox "Ingresar NIT"
Me.txtNumeroActa.SetFocus
End If
ElseIf IsNull(txtNumeroActa) And IsNull(txtNumeroActa) Then
MsgBox "Ingresar Número de Acta y NIT"
Me.txtNumeroActa.SetFocus
Me.txtNumeroActa.SetFocus
End If
End Sub
當我運行它時,會出現一條錯誤消息:其他如果我對我可以檢查或更改的內容有任何想法?
感謝您的關注。
If IsNull(txtNumeroActa) Then
MsgBox "Ingresar Número de Acta"
Me.txtNumeroActa.SetFocus
ElseIf IsNull(txtNumeroActa) Then
MsgBox "Ingresar NIT"
Me.txtNumeroActa.SetFocus
ElseIf IsNull(txtNumeroActa) And IsNull(txtNumeroActa) Then
MsgBox "Ingresar Número de Acta y NIT"
Me.txtNumeroActa.SetFocus
Me.txtNumeroActa.SetFocus
End If
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.