|
-
May 25th, 2000, 06:15 PM
#1
Thread Starter
Lively Member
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.
-
May 26th, 2000, 03:02 AM
#2
Frenzied Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|