Solved

probably simple question

Posted on 2002-03-21
8
205 Views
Last Modified: 2010-05-02
I'm looking at some VB code at work that contains (among others) this piece:

With oRS
 If Not (.EOF And .BOF) Then
   Do While Not .EOF
   lTaskID = !TaskID
... etc.

My question: what in the world do the "!" mean in there?
0
Comment
Question by:gsn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 18

Expert Comment

by:bobbit31
ID: 6885802
!TaskID means that TaskID is a field in the recordset (oRS)
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 6885808
so basically ITaskID = the value of TaskID field
0
 
LVL 43

Accepted Solution

by:
TimCottee earned 50 total points
ID: 6885809
The ! syntax refers to the fields collection of the recordset, this could equally be represented as:

ITaskID = .Fields("TaskID").Value

It is recommended to use the full syntax as the ! syntax forces the code to evaluate the line then convert it internally as above and then get the result. However in reality the time taken to do this is very small and has little to no impact.
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
LVL 1

Author Comment

by:gsn
ID: 6885814
yeah, I understand that... sorry, should have made myself clear: what's the difference between "." and "!" in that regard.
0
 
LVL 3

Expert Comment

by:Bahnass
ID: 6885815
TaskID is a field in oRS Recordset

With oRS makes    !TaskID translated into
oRS!TaskID

Hope it is clear
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6885816
the ! in this case is called the Bang operator.

you could have wrote:
lTaskID = .fields("TaskID").value
0
 
LVL 3

Expert Comment

by:Bahnass
ID: 6885826
Hi Tim again

No I'm abad typist !!!!
0
 
LVL 1

Author Comment

by:gsn
ID: 6885873
thanks for the prompt answer!!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question