我正在使用Access,我在代码中有很多查询,比如
"SELECT something, something " _
& "FROM the_table " _
& "WHERE something Is Null "或
"SELECT " & _
"Min(something), " & _
"Max(something2) " & _
"FROM (the_table " & _
"INNER JOIN another_table ON sm1 = sm2) " & _
"WHERE sm3 is not null " & _
"AND sm4 = " & Me.plan我想做一个宏,将这些字符串转换为可执行的查询(删除首引号和末尾引号,和符号),反之亦然,将查询转换为字符串连接。
输出示例如下:
SELECT
Min(something),
Max(something2)
FROM (the_table
INNER JOIN another_table ON sm1 = sm2)
WHERE sm3 is not null
AND sm4 = Me.plan我不知道怎么用谷歌搜索这个:因为我在问。
我知道如何在TextMate或类似的平台上录制宏,但我不熟悉它,我需要一些帮助。
有什么建议吗?谢谢:-)
发布于 2011-09-07 15:49:22
您可能可以使用DoCmd.RunSQL myString命令。
有关更多有价值的信息,请参阅here和there
顺便说一句,这是你可以做的谷歌搜索:http://tinyurl.com/3apsala
https://stackoverflow.com/questions/7330439
复制相似问题