AccesSoft - Articles - Work with databases in MS Access
Main | Articles | Links | Map
MS Access
Development cycles
Concept of the table
Properties of the table
Creation of the table
Linkage of tables
The scheme of data
Inquiries
Forms
Reports
Macros
Modules
External data
Network work
The client a server
Protection of data

Development of programme exhibits for MS Access

The Modules, unlike макросов, are more fine and powerful facility of the making the programme expansions in ambience Access, greatly approaching on its functional possibility to such professional instrument, as Delphi, Visual Basic or Power Builder. Simultaneously, the using the modules requires from user skill and qualifications of the programmer, as well as knowledges of the cardinal principles of the object-oriented programming.

For programming in Access is used procedural language Visual Basic for exhibits (VBA- Visual Basic for Applications) with accompaniment of the object expansions and element SQL. Process of the making Itself the programme expansions in ambience Access expects active use to technologies object-ориентшрованного programming (OOP). In base OOP lies the idea "packed функциональности", in accordance with which program is built from fundamental essence, named object. Each of object is characterized by set characteristic (the angel, -property) and operation, which he can execute (the angel,- method). The Realization interaction between object lies on performing cpеду that facility of the development, on which write the program, and so functioning(working) the programmer within the framework of technology OOP is reduced to creation object, description their characteristic and reaction on that go other external events.

The Fundamental notion OOP is a class. The Class - a pattern, on base which can be created concrete programme object. The Created object copy class becomes in such event. To background principle OOP pertain:

  • the encapsulation - an association characteristic and action, inherent object, in united package and hiding of the details to their realization from surrounding world. This means that user access to object is allowed through his(its) characteristic and methods only
  • inheritance - provides making the new classes on base existing that enables class-descendant to have (inherit) all characteristic of the class-parent
  • полиморфизм - (from греч. "многоликость") means that generated objects possess information on that, what methods they must use depending on that, where they are found in chain of the inheritance
  • modularity - an objects conclude in itself full determination of their features, no determinations of the methods and characteristic of the object must not be situated outside of him(it) that permits free copying and introduction of one object in others

Many programme objects in Access comply with physical object database such as tables, the forms, reports. For name component object, which comprise of itself collection more simple object, is used term family. For instance, object report falls into family reports. Aside from "visible" object exists and big amount "hidden" object, control which possible from programme exhibits only.

Two types of the modules exist In Access: standard and modules of the class. The Standard modules contains the procedures and functions, which can be caused from any window database. As a rule, such modules contains the programme code of the universal nature, intended for using in different places of the current application or in different applications even.

The Modules of the class are used, for making the new classes object. When making the concrete object, being copy of such class, any procedures, determined in module, become the characteristic and methods of this object.

The Modules of the forms and modules of the reports are a module of the class, connected with determined by form or report. We shall Notice that in early version Access they were shown by single possible instrument of the object-oriented programming. These modules contains the procedures of the processing event, started in response to their origin in the form or report. The Procedures of the processing event are used for governing behaviour forms or report and their response on events, for instance such, as striking the button.

The most Most important application of the object-oriented programming in Access is a programming the access to data. For decision given problems by company Microsoft was designed special interface - DАО (Data Access Objects).

DAO - a set of the object classes, which prototype the structure relational database. They provide the characteristic and methods, which allow to execute such operations, as creation database, determination of the tables and index, task of the relationships between table, shaping request and reports and t. p. Essential value to object model DAO is her(its) universal nature: she available to majority of the facilities of the software development, supported Microsoft, in particular, for Visual Basic. The Classes object access to given are organized on hierarchical scheme. On her(its) top is found object DbEngine, representing itself kernel database. Hereinafter follow the objects, have charge of control session access of the user to data, - Workspace (from angel, "workspace"). Each workspace includes one or several objects of the class database - Database, but they, in turn, contains family an object tables (TableDef), request (QueryDef), set of the record (RecordSet) and t. d.

In conclusion section, denoted module, shall note that we conciously do not touch strictly questions to theories and practical persons of the making the programs on VBA in ambience Access, since they are more extensive. As required readers can get acquainted with them in special professional publishing and manual.

The author: Y.N.Antonov Оптимизация приложений Is added: 21.06.2008

Main | Articles | Links | Map

Copyright 2007 - 2008 AccesSoft. All Rights Reserved