这可能是一个简单的修复方法。一些我的眼睛看不到的东西。我一直收到运行时错误,条件表达式中3464数据类型不匹配。错误在intX行中。我有一个命令按钮'cmdShowLot‘。我正在尝试检查tblLots中的lotID,确保tblLots上的ownerID和表单上的customerID匹配。如果有任何帮助,我将不胜感激。
Private Sub cmdShowLots_Click()
Dim intX As Integer
intX = DCount("fldLotID", "tblLots", "fldOwnerID = '" & Me.fldCustomerID & "'")
If intX = 0 Then
MsgBox "This Customer does not own a lot."
Else
DoCmd.OpenReport "rptCutomerLots", acViewReport, "", "", acNormal
End If
End Sub发布于 2014-05-31 07:05:23
假设fldOwnerID是一个数字,请删除此表达式中的撇号:
"fldOwnerID = '" & Me.fldCustomerID & "'"所以只要
"fldOwnerID = " & Me.fldCustomerIDhttps://stackoverflow.com/questions/23964518
复制相似问题