Accessing custom fields in MS Project 2000 
Author Message
 Accessing custom fields in MS Project 2000

Hi all,

I tried to access custom resource fields from the task context but failed.
Can anyone explain how can I do this. Is there a way of creating global
fields accessible from both task and resource contexts.

Thanks in advance.

Ara



Mon, 12 Jul 2004 21:34:20 GMT  
 Accessing custom fields in MS Project 2000
Show us the code and tell us what you are trying to access, then an
explanation will be easier to give and easier for you to understand.

--
Please try to keep replies in this group. I do check e-mail, but only
infrequently.

-Jack Dahlgren, Project MVP

+++++++++++++++++++

Quote:
> Hi all,

> I tried to access custom resource fields from the task context but failed.
> Can anyone explain how can I do this. Is there a way of creating global
> fields accessible from both task and resource contexts.

> Thanks in advance.

> Ara



Tue, 13 Jul 2004 01:35:45 GMT  
 Accessing custom fields in MS Project 2000
HI,

As in the Project interface, you can only see task details in task views.
The exception is three resource fields:
Name, Initials and Group.

These three fields can be seen in Gant views (by inserting a new column for
them).
VBA is the same, you can only see Tasks data for a task object.
Via an assignment you can get at all relevant resource data.

EG for a task Test that has resource Res, the following code access the
Standard Rate for teh first resource assigned to it.
Activeproject.resources(activeproject.tasks("Test").Assignments(1).ResourceI
D).StandardRate

If T is a variable set to your Task Test then this is a more readable:
Activeproject.resources(T.Assignments(1).ResourceID).StandardRate

--

Visit www.mvps.org/project/ for the Project MVP's FAQ and third party
add-ons

Rod Gill
Microsoft Project MVP
Visit www.projectlearning.com for customized Project and Office VBA macros
and Project companion software


Quote:
> Hi all,

> I tried to access custom resource fields from the task context but failed.
> Can anyone explain how can I do this. Is there a way of creating global
> fields accessible from both task and resource contexts.

> Thanks in advance.

> Ara



Tue, 13 Jul 2004 10:04:37 GMT  
 Accessing custom fields in MS Project 2000
Rod,

Does it need to be that complicated?

Each task has a resources collection so you can access the rate of the first
resource on the first task with:

ActiveProject.Tasks(1).Resources(1).StandardRate

or for a custom field like Text20:

ActiveProject.Tasks(1).Resources(1).Text20

--
Please try to keep replies in this group. I do check e-mail, but only
infrequently.

-Jack Dahlgren, Project MVP

+++++++++++++++++++

Quote:
> HI,

> As in the Project interface, you can only see task details in task views.
> The exception is three resource fields:
> Name, Initials and Group.

> These three fields can be seen in Gant views (by inserting a new column
for
> them).
> VBA is the same, you can only see Tasks data for a task object.
> Via an assignment you can get at all relevant resource data.

> EG for a task Test that has resource Res, the following code access the
> Standard Rate for teh first resource assigned to it.

Activeproject.resources(activeproject.tasks("Test").Assignments(1).ResourceI
Quote:
> D).StandardRate

> If T is a variable set to your Task Test then this is a more readable:
> Activeproject.resources(T.Assignments(1).ResourceID).StandardRate

> --

> Visit www.mvps.org/project/ for the Project MVP's FAQ and third party
> add-ons

> Rod Gill
> Microsoft Project MVP
> Visit www.projectlearning.com for customized Project and Office VBA macros
> and Project companion software



> > Hi all,

> > I tried to access custom resource fields from the task context but
failed.
> > Can anyone explain how can I do this. Is there a way of creating global
> > fields accessible from both task and resource contexts.

> > Thanks in advance.

> > Ara



Tue, 13 Jul 2004 14:33:29 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Driving MS Project from MS Access 2000 developed application

2. Command button won't make use of module driving MS Project from MS Access 2000

3. MS Project 98 vs Ms Project 2000

4. Conversion from MS project 95 to MS project 2000

5. Using MS Access to populate specific fields in MS Project

6. Linking Project 2000 to Outlook 2000 custom forms

7. Linking Project 2000 to Outlook 2000 custom forms

8. Linking Project 2000 to Outlook 2000 custom forms

9. Save as access database in MS Project 2000

10. Executing MS SQL Server 2000 stored procs via MS Access 2000

11. progress bar error by modification (MS Project 2000, MS SQL 7.0 and IIS 5)

12. Find Tasks created from MS Project 2000 in Outlook 2000

 

 
Powered by phpBB® Forum Software