主题:提示操作符丢失,该如何处理?
我有access下工程,制作了一个查询
Dim Str_number As String
Dim rst As New ADODB.Recordset
Dim Sql_Str As String
If IsNull(入库单编号) Or 入库单编号 = "" Then
Else
Str_number = 入库单编号
End If
Sql_Str = "SELECT 原材料入库单明细表.入库单编号 FROM 原材料入库单明细表 WHERE 原材料入库单明细表.入库单编号 = " & Str_number
rst.Open Sql_Str, CurrentProject.Connection, adOpenDynamic, adLockOptimistic
执行到rst.open 提示“语法错误(操作符丢失)”
着该如何修改阿!!????
Dim Str_number As String
Dim rst As New ADODB.Recordset
Dim Sql_Str As String
If IsNull(入库单编号) Or 入库单编号 = "" Then
Else
Str_number = 入库单编号
End If
Sql_Str = "SELECT 原材料入库单明细表.入库单编号 FROM 原材料入库单明细表 WHERE 原材料入库单明细表.入库单编号 = " & Str_number
rst.Open Sql_Str, CurrentProject.Connection, adOpenDynamic, adLockOptimistic
执行到rst.open 提示“语法错误(操作符丢失)”
着该如何修改阿!!????