generating reports

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I ahve a query which retrieves information from a table. What I would liek
to do is examine the contents of one of the fields automatically and if the
field equal a predefined value then automatically a report, print that
report, and then continue to the next record and repeat the same examination
of the contents of the records field content for the issue.


I was think of having the name of the report linked in a second table with
thecontents of the field being examined and try do some sort of linkage

any thoughts gratefully recevied
 
Patrick

Could you provide a bit more of a real-world example? It's a little tough
to imagine what you are using this approach to try to accomplish.
 
i imagine it is... sorry about that

as it happens i mucked around and acheived the following:

Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim Reportname As String

Set db = CurrentDb
Set rst = db.OpenRecordset("Select * From [Analytes and Worksheets query] ")
rst.MoveFirst

With rst
Reportname = rst.Fields!Worksheet.Value

DoCmd.OpenReport (Reportname)

rst.MoveNext


End With

rst.Close

Exit_Here:
On Error Resume Next
rst.Close
Set rst = Nothing
Set db = Nothing
 
Back
Top