Re: export of linkages between objects into MS project

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi Blue,

I've no experience moving stuff from Access to Project. But here's a
function that Duane Hookom posted a while ago to concatenate values from
related records into a comma-separated string. It works in a query.
Also, there are a couple of less versatile but perhaps simpler
concatenation functions on the Access Web www.mvps.org/access .

Function Concatenate(pstrSQL As String, _
Optional pstrDelim As String = ", ") As String
'example
'tblFamily with FamID as numeric primary key
'tblFamMem with FamID, FirstName, DOB,...
'return a comma separated list of FirstNames for a FamID
' John, Mary, Susan
'in a Query
'SELECT FamID,
'Concatenate("SELECT FirstName FROM tblFamMem
' WHERE FamID =" & [FamID]) as FirstNames
'FROM tblFamily
'
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strConcat As String 'build return string
Set db = CurrentDb
Set rs = db.OpenRecordset(pstrSQL)
With rs
If Not .EOF Then
.MoveFirst
Do While Not .EOF
strConcat = strConcat & .Fields(0) & pstrDelim
.MoveNext
Loop
End If
.Close
End With
Set rs = Nothing
Set db = Nothing
If Len(strConcat) > 0 Then
strConcat = Left(strConcat, Len(strConcat) - Len (pstrDelim))
End If
Concatenate = strConcat
End Function


On Thu, 08 Feb 2007 15:50:11 GMT, "bluemew" <u31601@uwe> wrote:

I want to export into MS project to display the objects as elements in a
Gantt-type view. Managed to achieve this for the objects themselves (using
the MS project Export Map) however i'm struggling to figure out how to import
the linkages

In order to import the linkages automatically, I think MS project expects a
text field containing the ID's of the linked objects (for import into the
"predecessors" field) separated by commas, eg "1,2,6,10".

For some context, The database contains 2 tables "research activities" and
"production activities" linked via a junction table (many-to-many
relationship - each research activity can link to many production activities,
and each production activity can have many research activities

Any clues on how to set up a query/expression to create this as some sort of
calculated field? not too familiar with SQL or VBA, so the simpler the better
;-)

Alternatively, Anyone got a better method for exporting links into MS Project?


--
John Nurick [Microsoft Access MVP]

Please respond in the newsgroup and not by email.
.


Quantcast