Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2006-11-27
3
Medium Priority
?
221 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
winzig earned 2000 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying 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

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.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

721 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