Hi all, I'm doing a db front-end with vb6, Access'97, coding with DAO3.6, reporting with CR4.6
Just prior to printing the report, I recalculate a few things and update a yes/no field in the db:
The debug.print in there shows that the values are updated ("due" is the yes/no field). However, when the report prints, the changes are not reflected. If you print the report again straight away, without making any changes, the changes are shown in the report.VB Code:
Private Sub cmdReport_Click() Dim Interval As Single, varBookmark With rstShow varBookmark = .Bookmark .MoveFirst Do While Not .EOF .Edit If IsNull(!lastcheck) Then !due = True Else Interval = (DateDiff("d", !lastcheck, Now)) / 7 If Interval > !frequency Then !due = True Else !due = False End If Debug.Print !Name & " " & !lastcheck & " " & !frequency & " " & !due End If .Update .MoveNext Loop .Bookmark = varBookmark End With DoEvents crpReports.Destination = 0 crpReports.PrintReport crpReports.ReportFileName = "FTT.rpt" End Sub
Why not the first time??? :eek2:
I've unchecked 'save data with report', checked 'verify on every print', checked 'refresh data on every print' and unchecked 'save data with closed report'. Unless the good lads at Seagate have got another option buried somewhere I think I've got that sorted.
Any ideas???? Peter
