PDA

Click to See Complete Forum and Search --> : Calling an Access(2000) report from VB6


npolo
Oct 21st, 2003, 03:02 PM
How can I call a report in Access(2000) from VB6???:confused:

JefB
Nov 3rd, 2003, 11:54 PM
At the following URL (on Microsoft Knowledge Base), look for Previewing or Printing a Report. Also, read from the start since it shows you how to use Access objects :

http://support.microsoft.com/default.aspx?scid=kb;en-us;147816

Here is a short example:


Set objACCESS = CreateObject("Access.Application")
With objACCESS
.OpenCurrentDatabase strDatabase
.Visible = True
.DoCmd.OpenReport strReportName, acPreview
End With
Set objACCESS = Nothing


JeffB