Hi,
Actuaky this worked in another application that I did but here I am getting strange errors. The first error that I get is "Could not find " S:\Accounting\DB\development\Dev_Evn\Outstanding Check Database\Outstanding Check Database.mdb" But this si not an mdb? The other erreor that I am getting is:


"The database has been placed in a state by the user 'Adnin' on the machine that prevents it from being opened or locked."
The when I hit Ok I get a "Data link property box".

The version of ms Access is 2007, may be this code is only good for 2003?
any ideas on how to get this to work or any other code that I can use would reay be appreacited.
Thannk you

Here is the code that I using:
Code:
Sub MailmergeGrt90()
Dim strFilePath As String
Dim objWord As Word.Document
Dim stFile As String
stFile = FindTxtFile
Set objWord = GetObject(stFile, "Word.Document")
objWord.Application.Visible = True 'Make Word visable
objWord.MailMerge.OpenDataSource _
Name:="S:\Accounting\DB\development\Dev_Evn\Outstanding Check Database\Outstanding Check Database.accdb", _
LinkToSource:=True, _
Connection:="Table tblTestHold", _
SQLStatement:="Select * from qryOutstanding>90"
'Execute the Mail Merge.
objWord.MailMerge.Destination = wdSendToNewDocument
objWord.MailMerge.Execute
End Sub