[AccessD] Reporting Question

Michael R Mattys michael.mattys at adelphia.net
Thu Jan 15 18:43:53 CST 2004


----- Original Message -----
From: "Robert Gracie" <Subscriptions at servicexp.com>
To: "Access Developers discussion and problem solving"
<accessd at databaseadvisors.com>
Sent: Thursday, January 15, 2004 7:08 PM
Subject: RE: [AccessD] Reporting Question


>
>   So is my idea all "Wet", is it not possible, is it too difficult, is it
> just plain dumb.....?
>
>
> Robert Gracie
> www.servicexp.com


Robert,

Opening a report "remotely" is definately possible
and if you want it, then it's not dumb.

In fact, I know several people from this list who
do it all the time. It's simply a matter of populating
the table that the remote report is based on.


Sub DisplayReport()
    Dim appAccess As Application
    Const strConPathToSamples = "C:\Program Files\Microsoft
Office\Office\Samples\Northwind.mdb"
    Dim strDB As String
    ' Initialize string to database path.
    strDB = strConPathToSamples
    ' Create new instance of Microsoft Access.
    Set appAccess = CreateObject("Access.Application.8")
    ' Open database in Microsoft Access window.
    appAccess.OpenCurrentDatabase strDB
    '>Delete * From Table and populate as you see fit
    ' Open Report.
    appAccess.DoCmd.OpenReport "Alphabetical List of Products",
acViewPreview
    appAccess.Visible = True
    Set appAccess = Nothing
End Sub


Michael R. Mattys
Try MattysMapLib for MapPoint at
www.mattysconsulting.com



More information about the AccessD mailing list