473,783 Members | 2,545 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Word won't hold ODBC data source

Everyone,

I posted the message below back in February and didn't get any
information. I also wasn't able to find any documentation in MS Help,
web site, or other groups. I'm posting now with results of my
research in case anyone else might need this information.

I consulted with my MIS colleague, and he said it would be ok to have
each merge file pull the whole database when the criteria screen is
opened. His reasoning was that it doesn't take as long as copying or
moving a large file, which people often do without causing network
problems. We also found it doesn't actually pull the whole database,
it only pulls to about the middle of the S's. This is encouraging
because it suggests there's a limit on how much the ODBC will pull at
one time.

We decided to implement the change from DDE to ODBC, and I converted
each Word file and let MS create a new ODBC connection in "My
Connections". Since the ODBC doesn't open the database, the fields
have to be formatted in the Word file. I used switches in the merge
fields to format currency and date fields. There was an article I got
from another thread that shows this. It's called MS Office and VBA
Developer Mail Merge: Part I. Unfortunately I no longer have the
link, but the address at the bottom is
htttp://msdn.microsoft. com/library/en-us/dnovba00/html/MailMergePartI. asp?frame=true.

The date and currency switches worked fine, but I ran into trouble
with a date field that's often blank (the value of the text field next
to it is used in that case). When the value of this field was blank,
the ODBC merge showed it as all zeros. I found some instructions on
using an If - Then - Else field in such a case, but when I typed in
the code it didn't work as advertised.

Eventually I found that when the code is typed into an If - Then -
Else field, the brackets {} have to be inserted by keying Ctrl - F9.
When I did this and typed in the code and field names, it worked fine.
Here is the code

{IF {MERGEFIELD LossDate} = 0 "" "{MERGEFIEL D LossDate \@
"MM/dd/yyyy"}"}
If the LossDate field value = 0, Then print "", Else print LossDate
MM/dd/yyyy

However, it looks odd in the merge document. The If - Then - Else
field either doesn't show at all, or shows a random date in the field
space. But it works, and that's what counts.

Julia


http://groups.google.com/groups?dq=&...ing.google.com
--------------------------------------------------------------
Hi everyone,

We do several Word merges from my database each day, and the default
DDE link is noticeably slow. I'm trying to arrange ODBC links which
are much faster. Office XP, Word 2002, Access 2002.

The main problem I'm having is, when the ODBC merge file is closed
after setting criteria and saving, then re-opened, it can't find the
data source and has to be re-linked. Does anyone know how to get it
to save the criteria and the data source? Without coding, a simple
link? It does hold its data source if I save and close it without
entering merge criteria.

It occurs to me I could train my users not to save after a merge, then
it wouldn't save the criteria, and then presumably (I haven't tried
this as I just thought of it now) it would save it's link since it has
no criteria entered. But when the criteria screen is opened after
connecting the source it pulls the whole database, more than 16,000
records. This is still very fast, but on general principles I'd
rather not have it do that. That's a lot of network traffic, and the
database is growing fast, and it could cause problems as it gets
bigger, or am I wrong about this?

The other thing is the date and currency fields are not correctly
formatted, but I did find an article that tells how to fix this.
However, the whole issue will be moot if I can't arrange it so my
users can open the Word merge file, do the merge, and close it like
they normally do.

Any help is appreciated - I've been searching this group and help with
no results on the link issue

Thank you,
Julia
Nov 12 '05 #1
0 2383

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1310
by: Fernand St-Georges | last post by:
I have Sql Server 2000 and Word from Office Xp. Since a few weeks, I cannot import Data from my database towards a Word document. I follow the procedure, but at the end, it tells me Word cannot find the data source. If I use Excel, well it works perfectly. What is the gig? thanks
4
8879
by: Tom Dauria | last post by:
I have an application that will be distributed remotely. In the Access application I am opening Word documents and mail merging. The Word documents are linked to a tmpLetter table. In my code I write the records to be merged into that table. The Word documents are using a system dsn (ODBC) to connect to the data source. In my code I simply open the Word documents after writing to the table do a mail merge and print. It runs pretty...
0
422
by: Julia Baresch | last post by:
Hi everyone, We do several Word merges from my database each day, and the default DDE link is noticeably slow. I'm trying to arrange ODBC links which are much faster. Office XP, Word 2002, Access 2002. The main problem I'm having is, when the ODBC merge file is closed after setting criteria and saving, then re-opened, it can't find the data source and has to be re-linked. Does anyone know how to get it to save the criteria and the...
5
4042
by: Jerry Hull | last post by:
I'm working with a database developed by an untrained person over several years - and on a network that has recently been upgraded with a new server installed and MS office upgraded from 2K (I think - it might have been XP) to 2003. The database is impressive, both in what it does and the obtuse and inconsistent ways it works. There are several hundred queries, for example, with no indication of where they are used or if they are in fact...
10
26097
by: John | last post by:
Hi I am trying to do a word mailmerge form within my vb.net app. My problem is how to do a query on one of my tables and use the result as the mail merge datasource. Any help would be appreciated. Thanks Regards
0
1540
by: pnr | last post by:
I transferred my database to a new computer. I can open it in 2003 Access, but am keeping it in the 2000 version until I get it working correctly. I have dozens of Word documents where I use various Access queries as my datasource. Now when I try to mail merge in Word (for some, not all, of my documents.) Word mail merge message may say it can't find the data source. So it gives me a data selection box and I choose my transferred...
1
12254
by: John Welch | last post by:
I'm trying to use the Mergit() function from the MS Knowledge base article to merge data from a query or table in my Access 2000 mdb into an existing word merge document. Every time it runs it brings up the dialog "Confirm Data Source", and asks if I want to use OLE, DDE, or ODBC. If I say ODBC, it then asks me for the table name. If I do all that, the merge works correctly, but I don't want users to have to do all that. I thought the...
0
1805
by: Darragh | last post by:
I'm encountering some serious problems trying to set Access 2000 querys (parameters and views) as data sources for my mail merge documents (Word 2003). After spending hours scouring the web for some existing help and coming up with nothing, its time to admit defeat and ask here ! Trying to set the data source to a preexisting query via DDE results in an 'Unable to establish DDE connection' - similar to the error described at...
2
2157
by: JeffN825 | last post by:
Hello, Thank you in advance for any assistance. I am trying to set up a mail merge from VB6/VBA code with Word 2000 using an ODBC data source (SQL 2000). I have successfully gotten the connection working using both a file dsn and a machine dsn. I am currently using a simple test merge template with fields <<FirstName>> (a nvarchar) <<Id>> (an int primary key).....plus a <<NextRecord>> field. The template doc itself has no data source...
0
9643
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9946
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8968
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4044
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.