L
L.A. Little
I have some code that hasn't been used in a couple years.
Back then it was MS Access 98 and MS Word 98. Now it's
2000 on both of these. The code does a simple query from
Access through an ODBC driver that I've set up. I've
greatly simplified the code to see if the simplest of
queries would work. It doesn't. Here's the code snippet
for the simple query ...
Set didFieldSucceed = Selection.Fields.Add
(Range:=Selection.Range, _
Type:=wdFieldEmpty, Text:="DATABASE \c ""DSN=" &
DatabaseName & _
""" \s ""SELECT [Req#], Type, Version, State,
Description " _
& "FROM tblRequirements WHERE [Req#] = 1 "";",
PreserveFormatting:=False)
which ends up in a query something like this
Select Req#], Type, Version, State, Description
FROM tblRequirements
WHERE [Req#] = 1
This query works and returns the selected record but the
description field (which is a memo field in Access) gets
chopped to 255 characters. I've played with some of the
setting on the ODBC driver setup but couldn't get any
relief. Anyone have ideas?
Les
Back then it was MS Access 98 and MS Word 98. Now it's
2000 on both of these. The code does a simple query from
Access through an ODBC driver that I've set up. I've
greatly simplified the code to see if the simplest of
queries would work. It doesn't. Here's the code snippet
for the simple query ...
Set didFieldSucceed = Selection.Fields.Add
(Range:=Selection.Range, _
Type:=wdFieldEmpty, Text:="DATABASE \c ""DSN=" &
DatabaseName & _
""" \s ""SELECT [Req#], Type, Version, State,
Description " _
& "FROM tblRequirements WHERE [Req#] = 1 "";",
PreserveFormatting:=False)
which ends up in a query something like this
Select Req#], Type, Version, State, Description
FROM tblRequirements
WHERE [Req#] = 1
This query works and returns the selected record but the
description field (which is a memo field in Access) gets
chopped to 255 characters. I've played with some of the
setting on the ODBC driver setup but couldn't get any
relief. Anyone have ideas?
Les