Solved

Importing MS Access info (table) into MS Project as a task list

Posted on 2006-11-27
3
217 Views
Last Modified: 2013-11-15
Hi there,

So I'm having a hard time finding a snippet of VBA code, or any useful help file to assist me with my project.  This is the situation:

I have a MS project file, with all my tasks and such.  What i want the project to do, is whenever its opened, to connect to a MS access file to "check progress" by copying data from a specific table (the entire table) and assigning specific cells as tasks, in a specified "snags" section of my project.  I am looking for the required VBA code to do this.

So as the access database is updated on the users end, management can track to see how many 'snags' have been thus far opened, closed and remaining. (these data points are available on the table)  These snags must not copy over other tasks as they are not the final step in my project- so they must push other tasks down (and not replace them in Project)

Hopefully I have been clear in what I need your expert help in, if not, please ask and I will clarify!

PS- Anything is appreciated- however I am looking for a quick fix (snippets of code)

Thanks

-Nick

0
Comment
Question by:NickVerreault
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
winzig earned 500 total points
ID: 18021849
snippet which creating tasks:
pj is project :)

rstTask.Open qry, conn, adOpenDynamic, adLockPessimistic
Do Until rstTask.EOF
    TASK_UID = rstTask("Task_UID")
    If IsNull(TASK_UID) Or TASK_UID = 0 Then
        Dim i As Integer
        i = FindPos(pj, conn, rstTask)
        Set MyTask = pj.Tasks.Add(rstTask("Popis").Value, i + 1)
        MyTask.OutlineLevel = 1
        SetTasksProperties MyTask, rstTask, True
        rstTask("Task_UID") = MyTask.UniqueID
        rstTask("WPROJ_ID") = WPROJ_ID
    End If
    rstTask.Update
    rstTask.MoveNext
Loop
rstTask.Close
0
 

Author Comment

by:NickVerreault
ID: 18033449
Thanks for this, but do you think you could give me a little bit of an explanation as to what your code is doing? I'm a rookie at VBA so anything will help. Thanks!
0
 
LVL 10

Expert Comment

by:winzig
ID: 18035839
http://www.thescripts.com/forum/thread521376.html
there is described the work with MDB file

this way Im creating new task
Set MyTask = pj.Tasks.Add(rstTask("Popis").Value, i + 1)
pj is Project (you can use  ActiveProject instead of  pj )
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Title # Comments Views Activity
Simple Gantt chart tool 4 306
MS Project 2013 8 168
Scrum Master: Certified Scrum Master 4 161
Excel Pivot Table with No Summary Fields 7 110
Article by: x-men
Where used to see Gantt charts for illustrating project timelines, but what if I wanted to visualize passed timed events? Here's how.
A simple overview of the possibilities of using technology for project management.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the adminiā€¦

713 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