Table Locking in Mail Merge

A

Ailish

Hi

We have setup a database which is in a folder on a c:\ which is shared out
to others users. Part of the functionality is to allow the users create
letters and merge data from the database into the word letters. The database
is currently set to be opened as shared (not exclusive). There are 2 users
on Windows 98, they can use the database at the same time for inputting data
etc.. but when they both try to do a mailmerge at the same time an error
occurs stating that the table used for the mailmerge is locked. The system
had been working fine for a number of years, this has only occurred recently.

This is the code we are using:

Set objWord = GetObject("\\pc08279\appeals\System\Letters\" & Letter_Name,
"Word.Document")
Document_Path = DLookup("[Doc_Path]", "Doc_Path_tbl")
Full_DocPathName = Document_Path & "\" & Letter_Name

'Make Word visible.
objWord.Application.Visible = True
' Set the mail merge data source
*** objWord.MailMerge.OpenDataSource _
Name:="\\pc08279\appeals\System\Appeals System.mdb", _
LinkToSource:=True, Connection:="Table Paragraph_Merge" ',
SQLStatement:="Select * from Appeals"
' Execute the mail merge.

The problem appears to be with the line with the ***.

Please help asap.

Thanks
Ailish
 
A

Arvin Meyer [MVP]

While you don't mention it, I suspect that at least part of your problem may
be due to having a database which is not split into a front-end containing
all the objects except the tables and a linked back-end which contains only
the tables. If that's the case, split the database (there's a wizard - for
Access 97 it's under Tools ... Addins, and for later versions it's in Tools
.... Database Utilites). Put a copy of the front-end on each user's
workstation and link it to the shared back-end database on 1 machine.

Using a server is preferable because it manages locks better and is more
secure, but I have seen up to 14 users successfully sharing a back-end on a
Windows 98 machine.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Top