Solved

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

Posted on 2006-11-27
3
214 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Re-planning is just as important as planning. MS Project files need to be updated regularly to reflect the current status of the project and to streamline the upcoming tasks. We have seen a lot of issues where project managers have not updated the p…
Online collaboration is quickly becoming embedded in the workplace, and its benefits are tangible. See what the current landscape looks like and what the future holds for collaboration tools and the future of work.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

867 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now