View Single Post
  #6   Report Post  
Murray Muspratt-Rouse Murray Muspratt-Rouse is offline
Member
 
Location: Mill Hill, London, England
Posts: 44
Default

From what I have observed there should be no need for the VBA code to reconnect with the database. It is running under MS Access, not under MS Word. Task Manager shows the current applications as 1. the main application form 2. the 2nd form 3. Microsoft Access [the 3rd form]. Word does not appear (because it has not been made visible yet). I have checked this theory by running a mail merge in db1 with debug and saw Word appear only when the code made it visible.

If you set up a mail merge document from Word you have to connect to the merge data source. Does Word then store the connection with the document so that it can be made when the document is opened? That would explain some of the problems others have encountered when they have distributed the function to PCs running other versions of Access and Word.

Murray

[quote=Peter Jamieson;394386]hello Murray,

I'm not completely sure what is going on here but...
a. if trying to access db2 is affecting db1, I wonder if you are using
the same database pathname in both the Name and COnnection string
parameters?
b. frankly, a Word 2003 VBA reference manual is unlikely to help because
- almost every time I have seen documentation for the
OpenDataSource method, it is wrong. That said, it is mostly "benignly"
wrong (i.e. it wouldn't matter if you followed the documentation), but
clearly written by someone who has followed earlier documentaiton and
not checked for themselves.
- /Word/ VBA reference material typically does not document the
connection strings, which are generally regarded as part of the database
documentation.

That said, I'll try and do some tests here to check the facts. It would
be useful to know for sure which type of database security you are
dealing with - "database password" or "workgroup security file".

You may or may not know that with the workgroup security file approach,
permissions can be relatively fine-grained, e.g. an individual may have
read/write permission for tablea, read only permission for tableb, and
no permissions for tablec.


Peter Jamieson

http://tips.pjmsn.me.uk