K
KB9REU
I'm trying to do a mail merge from Word 2003 and MS SQL Server 2005.
Previously I used Word 2003 and Access 2003 but I have since migrated
the data to SQL and still use Access as a front end for this app. The
app used to call a Word 2003 document through a hyperlink and run a
query to pull all records. The user would then select Mail Merge
Recipients and narrow the query down to just the date they needed.
This no longer works for me, it just returns all records as if the
query never ran. When I viewed the SQL server trace file I see that
there are #'s surrounding the date field instead of '. I've tried
creating a new datasource in word and a new mail merge document but
the query still shows #'s as being sent.
The field in the SQL server is smallDateTime.
exec sp_cursoropen @p1 output,N'SELECT * FROM "Violators" WHERE
"Letter 1 Date" = #06/11/2007#',@p3 output,@p4 output,@p5 output
select @p1, @p3, @p4, @p5
Thank you for your help,
Alan
Previously I used Word 2003 and Access 2003 but I have since migrated
the data to SQL and still use Access as a front end for this app. The
app used to call a Word 2003 document through a hyperlink and run a
query to pull all records. The user would then select Mail Merge
Recipients and narrow the query down to just the date they needed.
This no longer works for me, it just returns all records as if the
query never ran. When I viewed the SQL server trace file I see that
there are #'s surrounding the date field instead of '. I've tried
creating a new datasource in word and a new mail merge document but
the query still shows #'s as being sent.
The field in the SQL server is smallDateTime.
exec sp_cursoropen @p1 output,N'SELECT * FROM "Violators" WHERE
"Letter 1 Date" = #06/11/2007#',@p3 output,@p4 output,@p5 output
select @p1, @p3, @p4, @p5
Thank you for your help,
Alan