Solved

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

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

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.
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.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

746 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

11 Experts available now in Live!

Get 1:1 Help Now