Code Examples

Start A New Query


This example opens the Query By Example grid and automatically inserts the table passed to it.

'***************** Code Start *******************
SendKeys information
'Code by Terry Wickenden

Sub CreateQuery(strTable As String)
  'Brings up the QBE grid with the table in it.
  DoCmd.Echo False
  DoCmd.SelectObject acTable, strTable, True
  SendKeys "{enter}", False
  DoCmd.RunCommand acCmdNewObjectQuery
  DoCmd.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.