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
Solved

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

Posted on 2006-11-27
3
216 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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.
A simple overview of the possibilities of using technology for project management.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

856 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