-
Dec 29th, 1999, 06:20 AM
#1
What is ! operator for? When should I use this? What are the diff. between ! and .?
Thanx.
SK
-
Dec 29th, 1999, 06:54 AM
#2
Member
heck if i know, i want to know too!
------------------
webmaster@hackvp.com
http://www.hackvp.com
<quote>Ask not what you can do for your country, but what can your country do for you</quote>
-
Dec 29th, 1999, 07:03 AM
#3
_______
Could be wrong on this but I think I'm ok on these examples.
!
Example: is used in rleation to recordsets...it is a shortcut which eleminates the need to type in the field name when processing a filed in a record
data1.recordset!help
is the same as
data1.recordset.yourfield.help
?
example...You can use it as a character when specifing what chracters are permitted in a MaskedEdit control
MaskedEdit1.mask = "?#? #?#"
allows you
alpha number alpha number alpha number
ie..postal code..L6Y 7Y5
Wayne
Ps...I really don't think they are listed as Operators
-
Dec 29th, 1999, 07:06 AM
#4
Member
and somemore....
It's from MSDN for "!"(for VB)
The type-declaration character for Single is the exclamation point (!).
so, dim i as Single = dim i!
Or
When using Like Operator
? - Any single character.
"BAT123khg" Like "B?T*" ' Returns True.
"BAbT123khg" Like "B?T*" ' Returns False.
"B9T123khg" Like "B?T*" ' Returns False.
[!charlist] - Any single character not in charlist.
"aM5b" Like "a[L-P]#[!c-e]" ' Returns True.
"aM5b" Like "a[L-P]#[!b-e]" ' Returns False.
Joon
-
Dec 29th, 1999, 07:16 AM
#5
Please look at the following case.
If frmAccountDisplay!txtAccountBalance.Text < 0 Then
frmAccountDisplay!txtAccountBalance.BackColor = 0 frmAccountDisplay!txtAccountBalance.ForeColor = 255
End If
I have noticed that I can also reference a field (object) on a form using "!" instead of ".". Is it true? If so, in what cases can or should I use "!" instead of "." to reference a field or object?
Thanx.
SK
-
Dec 29th, 1999, 10:29 AM
#6
Guru
With databases/recordsets, the ! is a replacement for the .Fields("FieldName").value
SO
This:
myRS!CustID
would equal this:
myRS.Fields("CustID").Value
Tom
-
Dec 29th, 1999, 03:15 PM
#7
Hyperactive Member
If I put it in the correct words... it's a short way for looking things up in a collection.
Recordset!FieldName = Recordset.Fields("FieldName")
(Fields is a collection)
Form1!Text1 = Form1.Text1
Look it up in MSDN to get the description in nice words ;-) There is something about speed too.
-
Dec 29th, 1999, 06:53 PM
#8
I beleive it was once used to access controls
the ! for acessing controls/collections and the . for accessing property's/methods/etc
form1!text1.text = "text"
But then they added collections and stuff to everything and the ! thingie became obsolete.
-
Dec 29th, 1999, 08:16 PM
#9
Hyperactive Member
Yes, but since Text1 is part of the controls collection you can use the !. But, since it's basically a property of the form too, you can use the . ....
-
Dec 31st, 1999, 09:19 PM
#10
Lively Member
I don't know if this has anything to do with it, but in maths, x! means x * x-1 * x-2 * x-3 etc. so if x was 5, x! would be 5 * 4 * 3 * 2 *1 = 120
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|