After a few years of using the Crystal OCX, I start working with the CrViewer.
Can someone please tell me how I can access a password-protected Access database through Visual Basic 6 code?
The code I already wrote is:
Dim rptToepassing As CRAXDRT.Application
Dim rptRapport As CRAXDRT.Report
Screen.MousePointer = vbHourglass
Set rptToepassing = CreateObject("CrystalRuntime.Application")
Set rptRapport = rptToepassing.OpenReport(gsRapportenpad & gsRapportnaam)
crViewerDienstrooster.DisplayGroupTree = False
crViewerDienstrooster.DisplayTabs = False
crViewerDienstrooster.EnableAnimationCtrl = False
crViewerDienstrooster.EnableCloseButton = False
crViewerDienstrooster.EnableExportButton = True
crViewerDienstrooster.EnableGroupTree = False
crViewerDienstrooster.EnableRefreshButton = False
crViewerDienstrooster.EnableStopButton = False
rptRapport.PaperOrientation = crPortrait
crViewerDienstrooster.ReportSource = rptRapport
crViewerDienstrooster.ViewReport
crViewerDienstrooster.Zoom 1
Screen.MousePointer = vbDefault
What do I have to add to access the pasword-protected database?
Any tips to improve the code above is greatly appreciated.
Many thanks and greetings from Brugge (Bruges - Belgium),
Michel
Can someone please tell me how I can access a password-protected Access database through Visual Basic 6 code?
The code I already wrote is:
Dim rptToepassing As CRAXDRT.Application
Dim rptRapport As CRAXDRT.Report
Screen.MousePointer = vbHourglass
Set rptToepassing = CreateObject("CrystalRuntime.Application")
Set rptRapport = rptToepassing.OpenReport(gsRapportenpad & gsRapportnaam)
crViewerDienstrooster.DisplayGroupTree = False
crViewerDienstrooster.DisplayTabs = False
crViewerDienstrooster.EnableAnimationCtrl = False
crViewerDienstrooster.EnableCloseButton = False
crViewerDienstrooster.EnableExportButton = True
crViewerDienstrooster.EnableGroupTree = False
crViewerDienstrooster.EnableRefreshButton = False
crViewerDienstrooster.EnableStopButton = False
rptRapport.PaperOrientation = crPortrait
crViewerDienstrooster.ReportSource = rptRapport
crViewerDienstrooster.ViewReport
crViewerDienstrooster.Zoom 1
Screen.MousePointer = vbDefault
What do I have to add to access the pasword-protected database?
Any tips to improve the code above is greatly appreciated.
Many thanks and greetings from Brugge (Bruges - Belgium),
Michel