MartyConnelly
martyconnelly at shaw.ca
Thu Mar 6 18:58:00 CST 2003
as a guess you might try a connection string
where
name:="Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=c:\somepath\mydb.mdb;" & _
"Jet OLEDB:System Database=MySystem.mdw", _
"myUsername", "myPassword"
Stephen Bond wrote:
>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
>_______________________________________________
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com
>
>
>