473,407 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

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 "" "{MERGEFIELD 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 2347

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

Similar topics

5
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...
4
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...
0
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,...
5
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...
10
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...
0
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...
1
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...
0
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...
2
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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,...
0
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...

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.