Results 1 to 2 of 2

Thread: Password Prompt Problem

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Location
    Antrim
    Posts
    80

    Unhappy

    Hi,

    I'm trying to print an access report using a menu item in vb with the following code:

    Public Sub Print_Report()

    Dim AccessApp As Access.Application

    Set AccessApp = New Access.Application
    AccessApp.OpenCurrentDatabase "D:\Databases\Serck Incident Database\sid.mdb"
    AccessApp.DoCmd.OpenReport "rptReport", , , "[Ref]=#" & cboIncidentList & "#"

    End Sub

    The code works OK but the application prompts for a user name and password. I don't want this to happen.

    Any ideas?

    Best Regards,

    Rob Brown.

  2. #2
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105
    Throw in the following before you run the command:

    AccessApp.DBEngine.DefaultUser="UserID"
    AccessApp.DBEngine.DefaultPassword="PasswordforaboveUser"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width