|
DoCmd.RunSQL ""
在上面的双引号里面写了一条SQL如下:
INSERT INTO KSAP ( Nproff, Dspec, Kch, MinZkzh, MaxZkzk, Rs )
SELECT BM.Nproff, BM.Dspec, BM.Kch, DLookUp("[Zkzh]","BM","[Nproff]='" & [Nproff] & "' and [Dspec]='" & [Dspec] & "' and [Kch]=" & [Kch] & " and right([Zkzh],3)=" & Min(Right([Zkzh],3))) AS MinZkzh, DLookUp("[Zkzh]","BM","[Nproff]='" & [Nproff] & "' and [Dspec]='" & [Dspec] & "' and [Kch]=" & [Kch] & " and right([Zkzh],3)=" & Max(Right([Zkzh],3))) AS MaxZkzh, Count(BM.Zkzh) AS Zkzh之计数
FROM BM
GROUP BY BM.Nproff, BM.Dspec, BM.Kch;
这个SQL中有双引号,目前的问题就是,DoCmd.RunSQL "",双引号里面又有双引号,电脑就晕菜了,应该怎办写?
谢谢![em06] |
|