>>>Which report tool is best to be used in VB6 and Access 2000
>>>database? Thanks.
>>
>>I prefer Active Reports (
www.datadynamics.com). More code to write but a lot more flexibility!
>>
>>Access reports are not to bad too.
>>
>>One thing for sure, forget the DataReport that comes with VB6!
>
>If I were to use Access 2000 reporting feature, how can I call from
>my VB6 application? Some sample example would be appreciated. Thanks.
Notice that you need to install Access to every PC with that solution (meaning more licences to buy).
Const dbPathName = "c:\database.mdb"
Const strPassword = "PASSWORD"
Dim Acc As Object, db As Object
Set Acc = CreateObject("Access.Application")
Set db = Acc.Application.DBEngine.Workspaces(0).OpenDatabase(dbPathName, 0, False, ";pwd=" & strPassword)
Acc.OpenCurrentDatabase dbPathName, False
Set db = Nothing
Acc.DoCmd.OpenReport "ReportName", acPreview
Set Acc = Nothing
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com