sago_one
11-30-2007, 12:48 AM
I have a report that does the following
Looks at a table "Tracker"
The Tracker has DateAction,ActionNumber,Action,Startdate,Enddate
It checks for an action = Exported
The other entries for action are Added
The record with "Exported" has the startdate and enddate
So the report goes and checks the table "Tracker"
Looks for an Action = Exported and then picks up the startdate and enddate
And runs a report from "Employee Records" for records between startdate and enddate
Now I want to add on the same report
from the Tracker field... for the Exported record used to run the report,
ActionNumber , startdate and enddate .
How do I do this?
The code for the report is:
--------------------------------
Option Compare Database
Option Explicit
Private Sub PageHeader_Format(Cancel As Integer, FormatCount As Integer)
Dim RecHisto As Recordset
Dim Request As String
Request = "select StartDate from Tracker where DateAction= (select max(DateAction) from Historic where Action = 'EXPORTED')"
Set RecHisto = DBEngine(0)(0).OpenRecordset(Request, dbOpenSnapshot)
If Not RecHisto.NoMatch Then
'Text80.Value = RecHisto.Fields(0)
End If
RecHisto.Close
End Sub
Private Sub PageHeader_Print(Cancel As Integer, PrintCount As Integer)
End Sub
------------------------
Help!!!
Looks at a table "Tracker"
The Tracker has DateAction,ActionNumber,Action,Startdate,Enddate
It checks for an action = Exported
The other entries for action are Added
The record with "Exported" has the startdate and enddate
So the report goes and checks the table "Tracker"
Looks for an Action = Exported and then picks up the startdate and enddate
And runs a report from "Employee Records" for records between startdate and enddate
Now I want to add on the same report
from the Tracker field... for the Exported record used to run the report,
ActionNumber , startdate and enddate .
How do I do this?
The code for the report is:
--------------------------------
Option Compare Database
Option Explicit
Private Sub PageHeader_Format(Cancel As Integer, FormatCount As Integer)
Dim RecHisto As Recordset
Dim Request As String
Request = "select StartDate from Tracker where DateAction= (select max(DateAction) from Historic where Action = 'EXPORTED')"
Set RecHisto = DBEngine(0)(0).OpenRecordset(Request, dbOpenSnapshot)
If Not RecHisto.NoMatch Then
'Text80.Value = RecHisto.Fields(0)
End If
RecHisto.Close
End Sub
Private Sub PageHeader_Print(Cancel As Integer, PrintCount As Integer)
End Sub
------------------------
Help!!!