【问题标题】:access isnull combo value访问 isnull 组合值
【发布时间】:2013-07-09 18:06:42
【问题描述】:

我正在尝试检查是否为组合选择了一个值,但真正的部分(未选择任何值)抛出一个错误,指出:There is an invalid use of the . (dot) or ! operator or invalid parentheses.

If (Len(MinCombo) = 0) Then
    MsgBox "true"
Else
    MsgBox "false"
End If

I have also tried this code but it evaluates to the false part when a value is selected:

If (IsNull(MinCombo) = True) Then
    MsgBox "true"
Else
    MsgBox "false"
End If

我正在使用 MS Access Professional Plus 2010

【问题讨论】:

  • 我刚刚检查了If Me.MinCombo.Value = vbNullString Then...,它是成功的。
  • 仍然显示同样的错误

标签: ms-access combobox vba


【解决方案1】:

我是这样走的:

Me.MinCombo.SetFocus
If (Me.MinCombo.selText ="") Then
  MsgBox "true"
Else
  MsgBox "false"
End If

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-01-08
    • 1970-01-01
    • 1970-01-01
    • 2019-09-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多