wot is the ! operator referring to in VB?

bella

Registered User.
Local time
Today, 16:34
Joined
Jul 31, 2003
Messages
38
Hi, I've seen this syntax used in code samples, but I'm not very familliar with VB syntax, and I am wondering if the following means : IF a table (Table Name) has a field (Counter) and Counter contains a value of 3 Then strQueryName = "Report 3LO"
Elseif blah blah...

Is this wot this bit of code is saying?


If [Table Name]!Counter = 3 Then
strQueryName = "Report 3LO"
ElseIf [Table Name].Counter = 4 Then
strQueryName = "Report 4LO"

End If

??

does ny1 know?
 
Yep, you are correct in your assumption.
The ! is a field delimiter.

HTH,
Patrick
 
It is more of a reference indicator as you can have Forms!FormName!ControlName also (no fields included)

You will see ! and . intermixed in the code samples here.

The . refers to a property whereas the ! is an qualified identifier, indicating a user defined item eg

Forms!YourFormName!YourControlName.Property

becomes

Forms!frmClients!txtClientID.Visible

frmClients and txtClientID are items that you have created but Visible is a property of the textbox txtClientID
 

Users who are viewing this thread

Back
Top Bottom