A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Compound Merge from ODBC database



 
 
Thread Tools Display Modes
  #1  
Old May 17th, 2004, 05:56 PM
McLean J
external usenet poster
 
Posts: n/a
Default 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  
Old May 17th, 2004, 06:51 PM
Peter Jamieson
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:00 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.