[RESOLVED] Me!Text1 = Me.Text1 ???
hi, I found for the 1st time, a source-code where a guy uses "!" instead of "." to access the controls of a Form ! :ehh:
eg:
Code:
Msgbox Form1.Text1.Text
is the same as :
Code:
Msgbox Form1!Text1.text
(After making my tests, I noted that: use the "!" will point only to the controls, and not work with properties! (Me!Caption will not work))
But, i need more informations about that, is ther something else i dont know ? :D
Re: Me!Text1 = Me.Text1 ???
yes u r right its working only for controls, thanks for ur info...
Re: Me!Text1 = Me.Text1 ???
Office VBA also uses this optional notation but for objects
Ex...
Access:
Form1!TextBox1.Text
Re: Me!Text1 = Me.Text1 ???
The default property of a Form is a hidden property named [_Default] which normally holds a reference to the Form's Controls collection.
The "bang" (!) syntax is usable for access to a collection object's Item property. Using various levels of default properties, these all produce the same result when used in Form1:
Code:
MsgBox Form1.[_Default].Item("Command1").Name
MsgBox Form1!Command1.Name
MsgBox Form1.Controls("Command1").Name
MsgBox Form1.Controls.Item("Command1").Name
MsgBox Form1.Controls!Command1.Name
MsgBox Command1.Name
Re: Me!Text1 = Me.Text1 ???
Woow thanks dilettante :D