If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Compound Merge from ODBC database
I am trying to merge parts of a database into a word mail merge. I want each person to receive a list of the tasks they are assigned to... Here's what I have and I'm gettting an error "Word was unable to open the datasource". I've played with it several ways be always get the same error... Any ideads or places to look?
{DATABASE \d "d:\\wwireless\\eprojdata.mdb" \c "DSN=MS Access Database;DBQ=d:\\wwireless\\eprojdata.mdb;DriverId =25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;" \s " SELECT DISTINCTROW [FirstName] & " " & [LastName] AS Assignee, dbo_DirectoryUser.Email, W.Title, NextT.Title, NextT.PlannedStart, NextT.PlannedFinish FROM (((((dbo_TaskItem AS T INNER JOIN dbo_Workspace AS W ON T.ParentWorkspaceID = W.WorkspaceID) INNER JOIN dbo_ScheduleDependency AS Dep ON T.TaskItemID = Dep.RootItemID) INNER JOIN dbo_TaskItem AS NextT ON Dep.DependentItemID = NextT.TaskItemID) INNER JOIN dbo_TaskAssignment ON NextT.TaskItemID = dbo_TaskAssignment.TaskID) INNER JOIN dbo_EnterpriseMember ON dbo_TaskAssignment.ResourceID = dbo_EnterpriseMember.EnterpriseMemberID) INNER JOIN dbo_DirectoryUser ON dbo_EnterpriseMember.UserID = dbo_DirectoryUser.DirectoryUserID WHERE (((dbo_DirectoryUser.Email)='{MERGEFIELD e-mail}') AND ((W.Title) Like "*rf new build*") AND ((NextT.PercentComplete)100) AND ((T.PercentComplete)=100)) ORDER BY [FirstName] & " " & [LastName], W.Title, T.PlannedFinish, NextT.PlannedFinish; " \l "4" \b "447" \h \* MERGEFORMAT } |
#2
|
|||
|
|||
Compound Merge from ODBC database
Without looking at your query in too much detail, the first thing I would
try is to replace Like "*rf new build*" by Like "%rf new build%" I'd also check that the method I was using to connect to the data source for the merge did not conflict in some way with the method being used for the DATABASE field (e.g., if DDE access is being used for the merge and it is exclusive, OLEDB access for the DATABASE field is not going to work). -- Peter Jamieson "McLean J" wrote in message ... I am trying to merge parts of a database into a word mail merge. I want each person to receive a list of the tasks they are assigned to... Here's what I have and I'm gettting an error "Word was unable to open the datasource". I've played with it several ways be always get the same error... Any ideads or places to look? {DATABASE \d "d:\\wwireless\\eprojdata.mdb" \c "DSN=MS Access Database;DBQ=d:\\wwireless\\eprojdata.mdb;DriverId =25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;" \s " SELECT DISTINCTROW [FirstName] & " " & [LastName] AS Assignee, dbo_DirectoryUser.Email, W.Title, NextT.Title, NextT.PlannedStart, NextT.PlannedFinish FROM (((((dbo_TaskItem AS T INNER JOIN dbo_Workspace AS W ON T.ParentWorkspaceID = W.WorkspaceID) INNER JOIN dbo_ScheduleDependency AS Dep ON T.TaskItemID = Dep.RootItemID) INNER JOIN dbo_TaskItem AS NextT ON Dep.DependentItemID = NextT.TaskItemID) INNER JOIN dbo_TaskAssignment ON NextT.TaskItemID = dbo_TaskAssignment.TaskID) INNER JOIN dbo_EnterpriseMember ON dbo_TaskAssignment.ResourceID = dbo_EnterpriseMember.EnterpriseMemberID) INNER JOIN dbo_DirectoryUser ON dbo_EnterpriseMember.UserID = dbo_DirectoryUser.DirectoryUserID WHERE (((dbo_DirectoryUser.Email)='{MERGEFIELD e-mail}') AND ((W.Title) Like "*rf new build*") AND ((NextT.PercentComplete)100) AND ((T.PercentComplete)=100)) ORDER BY [FirstName] & " " & [LastName], W.Title, T.PlannedFinish, NextT.PlannedFinish; " \l "4" \b "447" \h \* MERGEFORMAT } |
Thread Tools | |
Display Modes | |
|
|