Re: Make a report show content from an external Database



Is there a reason why you don't maintain linked tables?

You can create a query or modify the sql of a query to something like:

SELECT *
FROM Employees IN 'C:\Program Files\Microsoft
Office\Office10\samples\Northwind.mdb';

This would allow you to create a record source for your report.

--
Duane Hookom
MS Access MVP

<TimDGCB@xxxxxxxxx> wrote in message
news:1147262965.424831.157230@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,

I have created an interface in access witch lets the user select a
database file so he can edit this. So i have a database file with forms
and a database file with al my data. For reading in the data from my
external database I use something like folows in my Form_Load Event:

Dim db As Database
Dim qdf As QueryDef
Dim rs As Recordset

Set db = OpenDatabase("ExternDatabaseName.mdb")
Set qdf = db.CreateQueryDef("", "SELECT * FROM Table")
Set rs = qdf.OpenRecordset(dbOpenDynaset)

Set me.Recordset = RS

Now that this works in my forms I want to acomplish a similar thing to
create my reports. The sad thing is that the above code dosn't seem
work with reports. It seems to be the case that a report doesn't has
the Recordset propery. So has anyone an idee how I can solve this
problem?

Thanks:

Tim De Graeve



.



Relevant Pages

  • RE: Multiply qty of filtered records
    ... If you should want to try doing this with a query (which is probably the more ... etc in the bottom part of the design view. ... I do know how to get this information in a Report, ... Dim rs As DAO.Recordset ...
    (microsoft.public.access.modulesdaovba)
  • RE: vary report label caption using form & table info
    ... a template for the label/envelope....which would be driven off the same query. ... Command button on the form opens the report "template. ... The label caption has 3 placeholders. ... Dim StartToken As Long ...
    (microsoft.public.access.reports)
  • RE: Need help with Code Please!!!
    ... MsgBox "The qryCompany\USFNumber query returned no records?", ... vbCritical, "NOTHING TO REPORT" ... Dim qd As QueryDef 'object ref to query item ... Dim myDataSource As String ...
    (microsoft.public.access.formscoding)
  • Re: Force Blank Lines
    ... I used your sugestion and I am not getting what I am ... I have a report with vb ... Dim lngDuration As Long 'Length of Usage ... Create a query based on: ...
    (microsoft.public.access.reports)
  • Re: dynamic crosstab A2002 - Almost there
    ... The solution is from Rogers Access and the report runs fine when I set the ... query with absolute values. ... >> Dim i As Integer ... >> End Sub ...
    (microsoft.public.access.queries)