2013-07-09 70 views
0

我想檢查是否有選擇的組合,但真正的部分(未選擇值)的值拋出一個錯誤,指出:There is an invalid use of the . (dot) or ! operator or invalid parentheses.訪問ISNULL連續數

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

我也曾嘗試這個代碼,但它的計算結果爲假一部分,當選擇一個值:

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

我使用的MS Access Professional Plus 2010的

+0

我剛剛檢查過'If Me.MinCombo.Value = vbNullString Then ...'並且成功了。 – tbur

+0

它仍然顯示相同的錯誤 – mpora

回答

0

我就這樣說:

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