Code Examples

Show Query SQL

acCmdSQLView

This routine displays the SQL Design view of the query whose name is passed to it.

'***************** Code Start *******************
' Code by Terry Wickenden

Sub ShowSQL(strQuery As String)
  On Error Resume Next
  Echo False
  DoCmd.OpenQuery strQuery, acViewDesign
  DoCmd.RunCommand acCmdSQLView
  Echo True
End Sub

'****************** Code End ********************

© 1998 - 2011 Terry Wickenden TKW Design Site developed, maintained and hosted by TKW Design. This site is best viewed at 1024 x 768. Optimised for Firefox.