Why do I lose datasource in Word VBA when I execute this code?

I

ImOkYoureNot

xsql = "SELECT * FROM `spec` where cuniqcode =' 3008'"
If I set my datasource from the menu everything works. I can step
through all records and view them in the mailmerge document one at a
time.

Once I execute the query string, it displays the record found, and
then save the document, when I open again I get the Find Data Source
cannot be found message.

How can I execute automatically a macro to position to display the
correct record in my database without getting this message.

Thanks
 
C

Cindy M -WordMVP-

Hi ImOkYoureNot,

Which version of Word are we discussing, here? And what connection
method has been used to link it in?
If I set my datasource from the menu everything works. I can step
through all records and view them in the mailmerge document one at a
time.

Once I execute the query string, it displays the record found, and
then save the document, when I open again I get the Find Data Source
cannot be found message.

How can I execute automatically a macro to position to display the
correct record in my database without getting this message.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top