how to use LinkedFieldID to display linked field for hammock tasks?

From: Denis (Denis_at_precheur.com)
Date: 05/19/04


Date: Wed, 19 May 2004 23:01:00 +0200

I try to display the name of the task to which the successor task is linked
to to create a hammock task.
Mike Morey wrote the following code to display the "true" predecessor's
name.
Imagine B is a hammock task between A and C. How could this code be modified
to display the name of the "linked predecessor" task A to wich the successor
hammock task B is linked (start of B is linked to end of A) and display the
name of the final task C to which the end of task B is linked too.

Here is Mike's code (which serves its purpose perfectly btw, thx Mike)

Sub PredName()
Dim t As Task
Dim tdep As TaskDependency
Dim mytext As String
Dim Linkedpred As String

For Each t In ActiveProject.Tasks
    If Not t Is Nothing Then
        If t.Predecessors <> "" Then
        t.Text15 = ""
        For Each tdep In t.TaskDependencies
            If Not tdep Is Nothing Then
            mytext = "(" & tdep.From.ID & ") " & tdep.From.Name & " "
                 If t.ID <> tdep.From.ID Then
                    If Len(t.Text15) < 256 Then
                    If Len(t.Text15) + Len(mytext) <= 256 Then
                        t.Text15 = t.Text15 & mytext
                    Else
                        t.Text15 = t.Text15 & Left(mytext, 255 -
Len(t.Text15))
                    End If
                    End If
                End If
            End If
        Next tdep
        End If
    End If
Next t
End Sub



Relevant Pages

  • how to use LinkedFieldID to show linked field ID
    ... I try to display the name of the task to which the successor task is linked ... Mike Morey wrote the following code to display the "true" predecessor's ... Imagine B is a hammock task between A and C. ... Dim tdep As TaskDependency ...
    (microsoft.public.project)
  • Re: SQL access from Cobol Test
    ... Dim oWrite As System.IO.StreamWriter ... Dim workline As String ... 000380 01 NEW-GENERIC-REC. ... 000810 DISPLAY "INVALID READ FROM IMPORT TEXT FILE". ...
    (comp.lang.cobol)
  • SQL access from Cobol Test
    ... fetching on a SQL cursor in COBOL. ... Dim oWrite As System.IO.StreamWriter ... 000380 01 NEW-GENERIC-REC. ... 000810 DISPLAY "INVALID READ FROM IMPORT TEXT FILE". ...
    (comp.lang.cobol)
  • Re: Stay-on-top form?
    ... Global Const WM_SM_CXVSCROLL = 2 ... Dim DisplayHeight As Integer ... iRtn = WM_apiReleaseDC'release display contex ... Sub xg_MaximizeWindow ...
    (microsoft.public.access.formscoding)
  • Re: Stay-on-top form?
    ... Global Const WM_SM_CXVSCROLL = 2 ... Dim DisplayHeight As Integer ... iRtn = WM_apiReleaseDC'release display contex ... ' Maximize the active form window, ...
    (microsoft.public.access.formscoding)