Peter - I'm not familiar with Word VB - I believe I did what you
suggested -
open VB - clicked on the open document that opened a new sheet, typed in
as
you asked - hit enter - nil - tried run - nil - I guess it needs something
else!
In the VB Editor you need to type what I suggested into the "Immediate
Window". If you didn't see an "Immediate Window", click View|Immediate
Window to open it.
If you have the time today, can you clarify a couple of things here:
I have a desktop link to the SQL Server data on the server
What sort of link is this?
I also have a
link to the tables through Navision - I've tried cutting and pasting
records
from that data into an Access database on my local PC - I consistently get
the same results: the first record of the requested records is always
replaced with the first record on the table in use.
Even when I've cut the
data to a new Access table. (e.g I cut 100 records into a new table,
properties from Berkshire, Oxfordshire, Wiltshire - I try to select all
properties in Oxfordshire but the first record is record 1 - a property in
Berkshire)
Are you saying that
a. whatever you retrieve the records into, you still see the problem where
"record 1 in the database" replaces the first record you want? Even if Word
is not involved at all? or that
b. when you retrieve the records into Access, they are the ones you want,
and it is only when you try to get them via Word that the replacement
occurs? (Seems unlikely that that could be the case but maybe you could
confirm/deny)
If it's (a) then I would have to suspect an error in your Dynamics database
(perhaps index corruption as I suggested, or a problem - perhaps
corruption - in an OLEDB provider and/or some other part of Microsoft's
general data access software (a.k.a. the MDAC). If the Dynamics database
makes extensive use of SQL Transact procedures, than I could just about
imagine that there is an error in (one of) the relevant procedure(s), but
that seems highly unlikely.
If you haven't tried the ODBC route, that's still my best guess at the
moment for a quick solution, primarily because that's what Word 2000 would
have used. However, it is usually non-trivial to connect using that method
so maybe we had better leave it for now...
Peter Jamieson