
Using and opening Access MDB report in VB6
Thanks dennis,
Sukkel
Try running this code dbpath is a const set int the module pointing to the
database.
Private Sub vieWAccess(report As String, rec As String)
beginprocess: On Error GoTo MyError
If mSa Is Nothing Then
Set mSa = New Access.Application
mSa.OpenCurrentDatabase (dbpath)
DoEvents
Else
mSa.DoCmd.Close
End If
mSa.Visible = True
mSa.DoCmd.OpenReport report, acViewPreview, , rec
mSa.DoCmd.Maximize
Exit Sub
MyError:
mSa.Quit
Set mSa = Nothing
Resume beginprocess
End Sub
Quote:
-----Original Message-----
Hello,
Is there anyone who knows how to open a Access 97 .MDB file and work with
the report made in Access ? I wish to open, and print a Access report from
VB.
Thanks for the help,
Greetings Sukkel
.