473,413 Members | 2,053 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,413 software developers and data experts.

Mail merge to word problems

52
HI again,

I am trying to use the mail merge to word wizard under External Data from a query and this is what happens:

On opening Word, I get an error message called: ODBC Microsoft Access Driver Login Failed, and the message says: Could not find file (and file name).

If I click OK, I go through a series of steps to link to the database and choose the query BUT the Access tab at the bottom of the screen starts flashing and when I click back to Access it says "Word was unable to open source".

If I click 'cancel', I get asked if I want to open a read only copy, or save it locally and update later (there is a third choice); I choose read only, and then it opens a window asking me to choose the Header Record Delimiters - for both the fields and the records. I have scrolled through and tried the options and nothing looks right. In Word, the database seems to be linked but there are no merge fields available because Word can't read them (I assume). Does anyone know what I should choose for the delimiters? (I'm not sure that this is the answer to my problem).

If I start in Word and try to link to Access, this also doesn't work.

I'm in Office 2007 on Windows XP; I have also tried this on the work computer by Remote and have the same problem. Work is on a later version of windows (Vista I think).

There is only one record in the query as it is picking up the details of the open record on a form. Ultimately, I would like to have a button on this form that, with one click, will merge the details from a single record to the Word document and print it. I have looked at Albert Kallal's 'super easy word merge' but am not sure how to apply it in Access 2007. He has pasted the link on another thread here - but I can put it in if need be.

Does anyone have any suggestions on how I might achieve this?

The Form is called: frmMainDataEntry; the query is called qryReferralForm. The Word document is called MergeForm.docx.

I hope this makes sense. I have been going around in circles.

Thanks for looking.
Jan 16 '10 #1
2 4305
NeoPa
32,556 Expert Mod 16PB
I know very little about MailMerge and Word, but if you are linking to Access you don't give any details about how you are trying to do it. I'm actually not even sure from there what details I'd expect to see, but certainly something. Probably including some SQL.

I also got the impression you were trying to link to a form, or the contents displayed on a form. This makes absolutely no sense at all of course, as forms contain no data, regardless of how many people seem to be under the impression that they do. They display records from an underlying recordsource. They can display one or many, but they are merely a window through which data is seen. They cannot be used as a data source.

Maybe it's qryReferralForm you're actually getting the data from, which would make sense, and maybe frmMainDataEntry uses the same source, but the data cannot come from the form itself.
Jan 17 '10 #2
mjvm
52
Hello,

In answer to the first part - I am using the Wizard available under External data to take me through the process and it it isn't working. I am getting an error message - which I hoped someone might understand and be able to help me with and therefore, fix my problem. After having a look at some of the other responses on this forum, I now realise that the forum focus is VBA and so this may not be the right place to post my question about Wizard error messages, (?). The Driver issue - from what I can gather on my Google searches - seems to be 'office/windows' related and not specifically related to my current Access database problem. I have also referred it onto our IT person.

I went back into the database to have another go in the hope that I might be able to post some SQL, but then it worked! And then it didn't again. And to be perfectly honest, I don't know where to look to get the SQL if it is there.

So at this point I am completely out of my depth.

And yes you are right (psychic): In setting thisup, I built qryReferralForm and set the criteria to select the student record open in frmMainDataEntry - so there is a single record in the query.

Then I want to put a Command Button on frmMainDataEntry that will print the merged word document for that student record in qryReferralForm. I imagine the code for the button requires the following steps (very simply): open word, open document, merge data from qryReferralForm, send to Print.

I gather that it is possible, but I don't know how to do it. Any examples of code on the net I have found have not been for Access 2007. My ability to take some code and modify it to my database is so limited - and I imagine the code required might be beyond my skills.

I don't know the answer to that one yet.

Cheers! :)
Jan 18 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: North Country Boy | last post by:
Hi I'm trying to run the mail merge operation in MS Word from within Javascript. I've already done this in VB but I'm having problems trying to do the same thing in Javascript. First I am trying...
2
by: Aaron | last post by:
hello, i am perfoming a mail merge with the following code. Public Function MergeIt() Dim objWord As Object Set objWord = GetObject("C:\MyMerge.doc", "Word.Document") ' Make Word visible....
8
by: Squirrel | last post by:
Hi everyone, I've created a mail merge Word doc. (using Office XP) , the data source is an Access query. Functionality I'm attempting to set up is: User sets a boolean field to true for...
3
by: Andy Davis | last post by:
I have set up a mail merge document in Word 2003 which gets its data from my Access 2000 database. I want to set up a button on a form that: 1. runs the query to provide the dat for the merge...
2
by: David | last post by:
I am having problems closing winword.exe.My mail merge works ok but the word application is not closing down. Can anyone help in telling me where I am going wrong and what I am missing out of my...
4
by: lesperancer | last post by:
I have 3 tables (office97) tblQuote quoteNbr tblDetails ( quote : 1 <-> M: quoteDetails) quoteNbr detailLine product value
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...
3
by: Bishman | last post by:
Hi, I have some issues with the code below. These are: ONE: In code I open an existing document and 'attach' the Mail Merge data source, but the data is not poulating the merge fields...
7
by: giladp1 | last post by:
I found Albert Kallal's great "Super easy Word Merge" code in his site at: http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html Thanks Albert so much for sharing this. I am looking...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
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...

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.