mysqln = "select sum(借方金额) as a1,sum(贷方金额) as a2
from 清单 " & "where month(日期)=" & Month(Now())
mysqln = "select sum(借方金额) as a1,sum(贷方金额) as a2
from 清单 " & "where month(日期)=" & Month(Now()) And 凭证号 = A
第一段的没问题,第二段编译也没发现问题,可就是查询不出来什么东西,应是能查出的.向各位高手请教作者: Henry D. Sy 时间: 2009-6-8 20:26
mysqln = "select sum(借方金额) as a1,sum(贷方金额) as a2
from 清单 where month(日期)=" & Month(Now()) & " And 凭证号 ='A'"作者: ZZBZZBZZZB 时间: 2009-6-8 20:37
mysqln = "select sum(借方金额) as a1,sum(贷方金额) as a2" from 清单 where month(日期)=" & Month(Now()) & " And 凭证号 ='A'"
提示 缺少语句结束呀作者: ZZBZZBZZZB 时间: 2009-6-8 20:38
忘了说明,A是长整形变量作者: Henry D. Sy 时间: 2009-6-8 20:45
mysqln = "select sum(借方金额) as a1,sum(贷方金额) as a2" from 清单 where month(日期)=" & Month(Now()) & " And 凭证号 =" & A作者: ZZBZZBZZZB 时间: 2009-6-8 21:50
就是这个了,多谢!