I.T. Discussion Community!
-Collapse +Expand
To/From Code
-Collapse +Expand Cross Ref Guide
-Collapse +Expand Members-Only
Sign in to see member-only pages.
   ► KBTo/From GuidesDelphi  Print This     

Self Keyword (Delphi and Access VBA Cross Reference Guide)

By Mike Prestwood

Delphi versus Access VBA: A side by side comparison between Delphi and Access VBA.

 
Language Details
 

Language Details is kind of a catch all for stuff that didn't make it into language basics nor any other category.

Self Keyword

[Other Languages] 
Delphi:   Self

Within the implementation of a method, the identifier Self references the object in which the method is called. The Self variable is an implicit parameter for each object method. A method can use this variable to refer to its owning class.

Syntax Example:
ShowMessage('Self=' + Self.ClassName);
Access VBA:   Me

Same as VB. The Me keyword is a built-in variable that refers to the class where the code is executing. For example, you can pass Me from one module to another.

Syntax Example:
Private Sub Command10_Click()
    MsgBox Me.Name 'Displays name of form (Form1 in this case).

End Sub













Follow PrestwoodBoards on: 


©1995-2020 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech