> 其他 >
VB 里...谁帮我看看这一句语句错在哪里了?
sql = "select [明细序号],[存款金额] from [cardinlist] where [账户号码] =" & Trim(combcard.Text) & " and [日期] between #" + fird + "# and #" + secd + "#"
总是不对..
人气:267 ℃ 时间:2020-06-14 06:37:11
解答
字符串类型要加单引号(如同日期类型值两边要用#号)
例如:[账户号码] ='12234'and [日期]
所以你的例子应该:
[账户号码] ='" & Trim(combcard.Text) & "' and

等号右边1个,and前有个空格,空格前加1个但引号
推荐
猜你喜欢
© 2026 79432.Com All Rights Reserved.
电脑版|手机版