访问宏IsNull多个变量

时间:2018-10-29 16:06:48

标签: ms-access macros

If IsNull(delivery) = True Then

此代码针对一个变量(即传递)运行。

我已经检查了isNull中的三个变量,我想要得到它的代码。

此代码用于Access宏。

1 个答案:

答案 0 :(得分:0)

根据所需的逻辑使用AndOr运算符,例如使用And逻辑:

If IsNull(delivery) And IsNull(variable2) And IsNull(variable3) Then
    ' Do something if all three variables are null
End If

或者,使用Or逻辑:

If IsNull(delivery) Or IsNull(variable2) Or IsNull(variable3) Then
    ' Do something if any of the three variables are null
End If
相关问题