如何将access中的query对应的SQL导出〔50分〕,在线等!!!
在access application中邮件某个按钮,选择“Build Event”,打开VBA,得到如下语句:Private Sub Command19_Click()
On Error GoTo Err_Command19_Click
Dim stLinkCriteria As String
DoCmd.SetWarnings False
DoCmd.OpenQuery "Listing_Project/Sales"
DoCmd.SetWarnings True
DoCmd.OpenForm "IB_Main", , , stLinkCriteria
Exit_Command19_Click:
Exit Sub
Err_Command19_Click:
MsgBox Err.Description
Resume Exit_Command19_Click
End Sub,希望有人指点如何将DoCmd.OpenQuery "Listing_Project/Sales"这个Query对应的SQL取出,我在Query列表中这能看到对应Design view~~~在线等!!!
------解决方案--------------------
currentdb.QueryDefs("Query1").SQL