>I have to print a report created in MS-Access 97 from a VB application.
>
>I have tried the following code:
>
>Private Sub cmdRapport_Click()
>Dim objAccess As Access.Application
>
> Set objAccess = New Access.Application
>
> With objAccess
> .OpenCurrentDatabase "C:\toto.mdb"
> .DoCmd.OpenReport "Rapport1"
> .Quit acQuitSaveNone
> End With
>
> Set objAccess = Nothing
>End Sub
>
>Now, I have my report printed BUT my database is protected by a password. When I execute the OpenCurrentDatabase method, a dialog box ask the password to the user.
>
>How can I pass the password using this method OR how can I print a report from a database object?
Il ne semble pas avoir de façon de le faire.
As-tu considérer utliser la sécurité avec usagers plutôt que le mot de passe ?
Ça serait sans doute possible.