¡¡

Ä«Å×°í¸®    ¾×¼¼½ºÀÏ¹Ý Á¶È¸:2571
 Á¦¸ñ   Properties and Methods of Application object

******************************************************************************************************

  Properties and Methods of Application object

******************************************************************************************************

  Some additional properties of the Application object are:

  BrokenReference    (Read-only; boolean) ' Checks to see if the project contains any broken references to databases or type libraries.

  CodeContextObject        (Read-only; object)     ' Determines the object in which a VBA procedure is running.

  CurrentObjectName       (Read-only; string)       ' Use to determine which database object has the focus, or in which object is running code or has the focus.

  CurrentObjectType (Read-only; integer)    ' Returns the object type of the object that currently has the focus.

  FeatureInstall   (Read/write; enum const)  ' Determines how to handle situations in which calls are made to methods and properties that require features not yet installed.

  IsCompiled                       (Read-only; boolean)  ' Determines whether all the modules in the project are in a compiled state.  Returns True if all  the modules are in a compiled state.

  VBE                   (Read-only; VBE object)   ' Represents the VBA editor and can be used to return a reference to the VBA editor object and its related properties.

  Visible                        (Read/write; boolean) ' Shows or hides the Access application.  If the Visible property is True, the application is visible; otherwise, the application isn't visible.  When the user starts Access, the Visible property is True and can't be changed.  When another application using Automation starts Access, the Visible property is False by default.  You can set this property in a VBA procedure only when the application is started by another application using Automation (and when the UserControl property value is False).

 

  Methods of the Application object are:

  Addto Favorites                   ' Adds the name of the current database to the Favorites folder.

  BuildCriteria                     ' Returns a parsed criteria string as it would appear in a Criteria cell in query design grid or as a Filter property setting.  Use this method to construct criteria for a query of filter based on user input.

  CloseCurrentDatabase   ' Closes the current database or project (the one that is open in the Access window) from another application that is controlling Access through Automation.  After you close the database that is open in the current instance of Access, you can create a new database or open another existing database in the same instance of Access.

  CodeDb                             ' Returns the name of the database in which code is running.

  CompactRepair                    ' Compacts and repairs the database project.

  ConvertAccessProject    ' Converts a database from one version of Access to another.

  CreateAccessProject            ' Creates a new project from within Access, or from within another application using OLE Automation.

  CreateControl                  ' Creates a control on an open form.

  CreateForm                           ' Creates a new form in minimized, Design view.

  CreateGroupLevel           ' Specifies groupings within a form or report.

  CreateNewWorkgroupFile   ' Creates a new workgroup file for a specified user.

  CreateReport                    ' Creates a new report in minimized, Design view.

  CreateReportControl           ' Creates a control on an open report.

  Echo                                   ' Turns screen painting off.  If you turn screen painting off in a VBA procedure, you must turn it back on or it will remain off, even if you press Ctl-Break or if the procedure encounters a breakpoint.

  Eval                                    ' Evaluates a text-string or numeric-value expression.

  ExportXML                      ' Exports data fro the specified Access object as XML files.

  FollowHyperlink              ' Opens the document or Web page specified in the hyperlink address that you supply as an argument.  Use this method to follow a hyperlink supplied by you or by the user.

  GetHiddenAttribute             ' Returns the value (Boolean) of a hidden attribute of an object.

  GetOption                         ' Returns the current value of an option in the Options dialog.

  HyperlinkPart                   ' Returns information about data stored as a hyperlink.

  ImportXML                      ' Imports data about a specified Access object from XML files.

  LoadPicture                           ' Loads a graphic into an ActiveX control.

  NewAccessProject           ' Creates and opens a new Access project.

  NewCurrentDatabase     ' Creates a new Database object in the Access window from another application that is controlling Access through Automation.  This method adds the database to the Databases collection automatically.  After you create an instance of Access from another application, you must either create a new database or open an existing database.

  Nz                                            ' Returns a zero-length string when a variant's value is Null.

  OpenAccessProject         ' Opens an existing Access project.

  OpenCurrentDatabase   ' Opens an existing Database object as the current database in the Access window from another application that is controlling Access through Automation.

  Quit                                    ' Quits Access.  This method has the same effect as selecting FILE | EXIT.  Use this method's option argument to specify treatment for any unsaved objects.

  RefreshDatabaseWindow       ' Updates the Database window after a Database window object has been added, deleted, or renamed.

  RefreshTitleBar                    ' Updates the Access title bar after you set the AppTitle or AppIcon startup properties in VBA.

  Run                                    ' Runs a procedure you have defined in an Access database from another application through Automation or from another Access database.

  RunCommand                 ' Runs a built-in menu or toolbar command.

  SetHiddenAttribute         ' Sets an object's hidden attribute.

  SetOption                          ' Sets the current value of an option in the Options dialog.  Use SetOption together with GetOption to observe and change the environmental options in VBA.  You can get and set any option in the Options dialog.  Changes you make are permanent; if you want to restore the original values when you close a database, hold them in public variables.

  SysCmd                             ' Displays text or a progress meter in the status bar.  Also returns information about Access and associated program files, or returns the state of a specified database object.

                *** and others ***

  DAvg          DCount          DDEExecute                 DDEInitiate              DDEPoke                  DDERequest            DDETerminate

  DDETerminateAll            DefaultWorkspaceClone                               DFirst                         DLast                        DLookup

  DMax                DMin           DStDev                     DstDevP  DSum                        DVar                          DVarP

  EuroConvert                     GUIDFromString                                             hWndAccessApp    SetDefaultWorkgroupFile

  StringFromGUID