在运行“docmd.openquery sqlchaxun”时会报错,“sqlchaxun”是一条select的查询语句?
请高手指点,小弟刚用ACCESS。谢谢大家了!
------解决方案--------------------查询名必须加双引号,如:
DoCmd.OpenQuery "sqlchaxun "
------解决方案--------------------Dim Conn As ADODB.Connection
dim sqlchaxun as string
Set Conn = CurrentProject.Connection
sqlchaxun = "你的查询语句 "
Conn .Execute sqlchaxun