show records in preview but not print

Asif

New member
Local time
Tomorrow, 01:35
Joined
Apr 13, 2009
Messages
1
I have used recordset in detail print event for some fields in report which shows records in preview but not print

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset(vstr, dbOpenSnapshot)

With rs
If .RecordCount = 0 Then Exit Sub
dt1.Caption = .Fields("Date") & ". GRN#." & .Fields("VocNo") & ". IGP#." & .Fields("IGP")
rt1.Caption = .Fields("Rate")
pt1.Caption = .Fields("LParty")
.MoveNext

Do While Not .EOF
Select Case .AbsolutePosition
Case 1
dt2.Caption = .Fields("Date") & ". GRN#." & .Fields("VocNo") & ". IGP#." & .Fields("IGP")
rt2.Caption = .Fields("Rate")
pt2.Caption = .Fields("LParty")
End Select
.MoveNext
Loop
End With
End Sub


Please suggest me solution to this problem.
 
perhaps looking up help on AbsolutePosition property might help? or Page Setup?
 
In Acces 2007 there is a "View" selection area in the properties menu for each field. You can select when you want the data to appear; "screen", "Print" etc. I am not familiar with other versions. Maybe earlier version have the same option? Hope this helps.
 

Users who are viewing this thread

Back
Top Bottom