[AccessD] Connection strings and Access security

Stephen Bond stephen at bondsoftware.co.nz
Thu Mar 6 16:56:01 CST 2003


I am trying to establish a DAO connection to do a Word mailmerge.  It has been working fine up till I changed the MDW to force users to log in to the MDB front end.  Below is the code that has worked up till the change.

After the change, this statement proceeds to open another version of Access using the default MDW (user=admin), and the app traps this eventuality in the AutoExec code and closes down that instance of Access forthwith.

I have looked at the OpenDataSource method in M$ Help, and have tried certain combinations to no avail, I suspect the keywords UID and PWD could be the key to this ...

Any suggestions?  BTW Access 2000, Word 2000.

</snip>
  With objWord.MailMerge
    .MainDocumentType = wdFormLetters
    .OpenDataSource _
        Name:=GetDBDir() & "\" & "ComplianceSchedulePROG.mdb", _
        LinkToSource:=True, _
        Connection:="QUERY qryComplianceRenewalCandidates"
       .Execute
  End With
</end snip>



TIA

Stephen Bond 
Otatara, New Zealand



More information about the AccessD mailing list