|
-
Nov 12th, 2002, 03:09 PM
#1
Thread Starter
Junior Member
Access 97 links to Crystal Report
In Access class module, I'd like to open an external Crystal Report and print it. Before you can run the report, it always prompt for username+ password. The program chokes if the password isn't blank. Does anyone know how to feed the login/password for the Crystal Report through Access VBA? I can do it in VB 6 but can't seem to work it out in Access.
Sample code
Me.Crystal.ReportFileName = ReplaceString(CurrentDb.Name, "mdb", "rpt")
Me.Crystal.SelectionFormula = blahbhalblhahah
Me.Crystal.Destination = crptToWindow
Me.Crystal.Action = 1
This works in VB:
Set crpTable = Me.Crystal.Database.Tables.Item(1)
crpTable.SetLogOnInfo "Dsn", "DB", "username", "password"
Thanks in advance.
Norm
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
|