vba - 获取错误 3464 条件表达式中的数据类型不匹配
问题描述
我得到错误 3464 标准表达式中的数据类型不匹配,但我无法离开它有什么问题???
Dim strsql As String
strsql = "select * from Shift where DFail Between " & txtVal1 & " and " & txtVal2
Me.RecordSource = strsql
解决方案
你错过了单引号:
strsql = "select * from Shift where DFail Between '" & txtVal1 & "' and '" & txtVal2 & "'"
但请记住,该文本是从左到右排序的,例如:1, 12, 2, 20
.
推荐阅读
- ibm-mobilefirst - 没有客户端组件的基于 IBM MFP 适配器的身份验证
- gcc - GCC 自动矢量化
- excel - Excel:从表中获取第一个值
- angularjs - Angularjs:如何检测输入数字的最小值和最大值
- ios - 在 iOS 上,ion-input 将字符类型转换为 void,除了第一个
- c++ - Bazel 允许我包含来自全局安装的库的标头
- bash - aws_launch_configuration: timeout - last error: dial tcp :22: connectex: No connection could be made because the target machine主动拒绝它
- angular - 使用 Angular 链接的服务端点
- html - 使用网格布局时列重叠
- c# - 减法C#Unity中的Vector3小数精度差