|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I have programed with VB6 and done some light
work receintly with Access. This is going to sound REAL stupid, but to tell you the truth, I have never really had much trouble NOT knowing what it means. In code I see references to Forms, Controls, and Form & Control properties proceeded by "Me." as in "Me!Form1.text" So I guess I would like to know what the "Me. or Me!" part means, and what the "!" is that is used sometime too? Code seems to work with it, and without it, but I have not been able to figure out exactly what it means. Any clear explanation would be appreciated. thanks Mike |
|
#2
|
|||
|
|||
|
There is no clear delineation but in general, Me! is a direct explicit reference of a limited scope to data related object value and object properties.
Me. is the implicit object reference which encompasses Collections, Values, Properties, Methods and Events and the two reference methods overlap and duplicate Explicit e.g: x = Me!Textbox x = Me!Textbox.Value Implicit reference by name . . . . x = Me.Controls("TextBox") x = Me.Controls("TextBox").Value Implicit reference by ordinal number . . . x = Me.Controls(0) x = Me.Controls(0).Value All of the above mean the same and .Value is optional in most cases! There is no clear delineation and my opinion is that the object design group at Microsoft were drugged by an overdose of spaghetti. This gets worse when one learns the history of the development of Access as Microsoft rushed to improve their original (and very poor) endeavour by buying up a multitude of companies. When programming for data tables, one is taken back in history, to dBase, Foxbase etc. |
|
#3
|
|||
|
|||
|
Now yer talking over my head! haha
So are you saying it is necessary, or that it is more a cross platform compatability thing? Where some developers, have just gotten used to using it, and for migrating their code across different programming languages? Like I mentioned, I am a beginner, almost more like a hobbiest, who tinkers, and learns by example. But thanks for trying anyways.. ;o) |
|
#4
|
|||
|
|||
|
You're not the only one over your head. It took me quite awhile to get used to it. Microsft does emulate some features of other languages, even the built in function names, to lure developers from other platforms and thus make it look like as an easy conversion, but the code is not convertible. It is just lifted from other, earlier developments.
|
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > Easy Question #1 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|