Issue with Word Mail Merge

  • Thread starter Thread starter Suzanne Lejeune
  • Start date Start date
S

Suzanne Lejeune

I am trying to get the Word Mail Merge to run based on a query. I get so
far as to see the wizard start, but then it asks for which table to use. I
then choose one and it says it can't access the source. If I try just
running the wizart on its own, it says I have the database open in exclusive
mode. I checked the user's permissions and the open mode and they are not
set to exclusive. Any feedback would be appreciated.

Thanks
 
H

Are you using the database on a network

I have opened up a database, and even with all the tables and queries open on my local machine, I have no problem connecting to the data source from a Word mail merge
However, if you OPEN the database in exclusive mode, you will not be able to connect to it. Opening a database in exclusive mode (for maintenance for example) is different to the settings under TOOLS>OPTIONS>ADVANCED

Hope you get it right
David Fox
 
It is possible that you have the mdb file opend up in Exclusive mode (that
means no one else..including other programs) can open the mdb file.

If you wish, give my sample word merge code a try (it even works if your
database is set to exclusive).

There is a sample data, and steps are outlined on how to use my word merge.
Give it a try and see if it works for you. If the example does work, then
you can read the detailed instructions on how to use this word merge example
in your application.

check out:

http://www.attcanada.net/~kallal.msn/msaccess/msaccess.html
 
Wow! This is fantastic! You have saved me hours of work. I especially
love the progress meter. Most users are so impatient, and to see that while
it's lauching is great. Thank you!

Suzanne
 
Problem. For some reason, I can get your code to work when doing a merge
for a single record but not when I choose All. I get the following error:

Run Time Error 91
Object Variable or With Block Variable not set.

Any thoughts?

Thanks
Suzanne
 
The first question would be does the sample download "merge all" button
work?

Remember, the "merge all" button simply accepts valid sql.

In the sample code I have

Me.Refresh
MergeAllWord ("select * from " & Me.RecordSource)

You should use something like:

dim strMySql = "select * from tblCustomers = 'Edmonton'"

MergeAllWord (strMySql)

So, #1 is to try the word merge example I have, and if that works, then you
might want to show what code you used for your example.

I would also check the DAO reference...you might try moving it up higher in
the list.

-
Albert D. Kallal (MVP)
Edmonton, Alberta Canada
(e-mail address removed)
http://www.attcanada.net/~kallal.msn
 
Back
Top