Referencing task information from an assignments object

G

Gilgamesh

I am looping through the assignments collector in each of my project
resources and when I get to a certain assignment I need to update
information in the Task that the assignment relates to.

I have noticed that the assignment object has a parent with a Tasks
collection that I would seem to be able to index through to set the detail.

For example :
Assign.Parent.Tasks(Assign.TaskID).Text1="Hi"
where Dim Assign as Assignment is the defiition would set Text1 in the task
to Hi and not the resource or assignment text.

My question is : Is it valid to index through the assignment parent tasks
using the TaskID field? This seems OK from what I have looked at but I was
thinking there may be circumstances where it is not valid.

I'm using MSP 2003 Pro

Thanks
 
G

Gilgamesh

Jan De Messemaeker said:
Looks good, I fail to see any potential problem
HTH

So the tasks in Assign.Parent.Tasks will always be in taskid order?
I was concerned that if they were in any other order that the indexing would
be invalid.
 
J

Jan De Messemaeker

Hi,

The parent property of the assignment returns the project so its .tasks
property will return the normal Tasks object, yes.

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top