Alison Balteramp;#039;s Mastering Microsoft Office Access 1002003 [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Alison Balteramp;#039;s Mastering Microsoft Office Access 1002003 [Electronic resources] - نسخه متنی

Alison Balter

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید



The Initialize and Terminate Events


The Initialize and Terminate events are the two built-in events that execute for a class object. The Initialize event executes as the class is instantiated, and the Terminate event executes as the class is destroyed.

Initialize


The Initialize event is generally used to perform tasks such as establishing a connection to a database and initializing variables. The following is an example of the use of the Initialize event:

Private Sub Class_Initialize()
FirstName = "Alison"
LastName = "Balter"
End Sub

In this example, the code sets the default values of the FirstName and LastName properties of the class to Alison and Balter, respectively.

Terminate


You generally use the Terminate event to perform the class's cleanup tasks. An example is closing a recordset used by the class. The following is an example of the use of the Terminate event:

Private Sub Class_Terminate()
rstCustomer.Close
Set rstCustomer = Nothing
End Sub

This code closes the recordset and destroys the recordset object variable. It provides an example of cleanup code that you would place in your own application.


/ 544