Home  Fees/Services  Access 2010 Template  Tutorials  Access Download  Articles  Search  Contact  Privacy  Links
Macro Programming Examples
Open Query DoCmd
 





DoCmd AddMenu
DoCmd ApplyFilter
DoCmd CancelEvent
DoCmd Close
DoCmd CopyObject
DoCmd DeleteObject
DoCmd FindRecord
DoCmd FindNext
DoCmd GotoControl
DoCmd HourGlass
DoCmd Min/Max/Restore
DoCmd OpenForm
DoCmd OpenQuery
DoCmd OpenReport
DoCmd OutputTo
DoCmd RunSQL
DoCmd SendObject
DoCmd TransferDatabase
DoCmd TransferText

Create Export Specs

 

Microsoft Office:
  MS Access 2003
  Access 2007
  Access 2010
  Access 2013



OpenQuery

The OpenQuery method opens a select or crosstab query in Datasheet view, Design view, or Print Preview - or runs an action query from visual basic.

OpenQuery
(command line continued below)
Openquery Example


The QueryName is the only required argument in the openquery statement and is the name of a saved query definition. View - is the view mode and can have one of the following values:

acViewDesign
acViewNormal     (default viewmode)
acViewPivotChart
acViewPivotTable
acViewPreview

DataMode - which has the following options:

acAdd
acEdit default
acReadOnly

When running an action OpenQuery you normally only specify the name of the query:

DoCmd.OpenQuery "Q_Update_Due_Date"

More OpenQuery examples:
 

Visual Basic Select Case with OpenQuery Example

DoCmd.OpenReport stDocName, acPreview Case 2 DoCmd.OpenQuery "Q_Daily_Prospect_Labels" Case 3 Set db = CurrentDb pitney = DLookup("Path", "Q_path_Pitney",






Microsoft Office:
MS Access 2003
Access 2007
Access 2010
Access 2013



A Blue Claw Database Design Template:

Loan Process Management Access Database
 










A Blue Claw Database Design Article:

Microsoft Access On The Internet
 









Blue Claw Database Design Downloadable Tutorial:
How To Fill Fields From Combo Box  



Contact Information

Copyright 2000-2014 Blue Claw Database Design