我正在尝试一种让用户单击多个复选框和列表来过滤子表单的方法。当我尝试使用AND
语句时,出现错误:Run-time rror '13': Type mismatch
。我在有关的线上放了一支箭。 And
语句不是用于这种方式过滤的有效语法吗?
Private Sub SearchB_Click()
If Me![CoreCB] = True Then
Me.Query1SF.Form.Filter = " IsDate([Core RS]) = True"
Me.Query1SF.Form.FilterOn = True
ElseIf Me![SiteCB] = True Then
Me.Query1SF.Form.Filter = " IsDate([Site RS]) = True"
Me.Query1SF.Form.FilterOn = True
If Not IsNull(SiteCombo.Value) Then
--> Me.Query1SF.Form.Filter = "[Location] = '" & Me.[SiteCombo].Value & "'" And " IsDate([Site RS]) = True" '!! THIS DOESN'T WORK
Me.Query1SF.Form.FilterOn = True
End If
ElseIf Me![SecurityCB] = True Then
Me.Query1SF.Form.Filter = " IsDate([Security]) = True"
Me.Query1SF.Form.FilterOn = True
End If
End Sub
答案 0 :(得分:1)
用于表单过滤器的字符串表达式似乎不正确。在下面的行中使用
from sklearn.metrics import mean_absolute_error as mae
accuracy = mae(y_test, y_pred)