[VBA ] Access 下拉式选单 run-time error

楼主: dbfhunter (新年新希望)   2018-08-18 14:22:22
各位前辈好:
小弟想用 Access作两个下拉式选单 A 和 B, A为英文字, B为数字
以下为语法
If A.Value ="" or B.Value = "" Then
MsgBox "choose"
Else
Me.Form.Filter = "[A] =' " & A.Value & " ' and " & " [B] = " & B.Value & " "
Me.Form.FiltenOn = True
Me.From.Requery
End If
当 AB下拉式选单没选东西时,按执行就会跑出
syntax error in query expression access 3075
若有选值后,再跑就OK,想请教告位是哪边出了错? 谢谢各位 感激不尽
作者: MOONRAKER (㊣牛鹤鳗毛人)   2018-08-27 18:19:00
跑到错误的时候用watch看A.value和B.value是什么

Links booklink

Contact Us: admin [ a t ] ucptt.com