Print Report

McDonald

New member
Local time
Today, 14:21
Joined
Feb 16, 2009
Messages
5
Dear,

I have a Table with hundreds records. I create a Form and a Report Template to link with this Table. I input a new record from this Form and try to print it out.

But my problem is I can't print the on-screen record. It will print all the records in my Table. Pls advise how I can only print the on-screen records. Thanks so much

B. regards,
Donald
 
i'm not so good on vb, and there is some other steps need to run. so can i use marco > openreport and add the statement on the condition field. But i don't know how to write this statment. Pls advise. Thanks
 
I don't use macros, but yes, you can use the condition. I believe it would look like the last part of what I posted, though you would need the full form reference instead of Me.
 
i have a question 2.. i used this code to save my report in folder with specific name.
Private Sub cmdKR_Click()
Dim dtkr As String
Dim filepath As String
Dim filename As String
Dim strTemplateLocation As String
filepath = DLookup("[lokasi]", "LokasiFailIP")
filename = DLookup("[Nama Fail]", "NamaFailIP")
' Specify location of template
strTemplateLocation = filepath & "\" & "Keterangan" & filename & ".doc"

dtkr = ("[DataKR.NoPendaftaran]=" & "'" & Me.NoPendaftarantxt.Column(0) & "'")
DoCmd.OpenReport "rptKRKesalahan", acViewPreview, , dtkr
DoCmd.OutputTo acOutputReport, "rptKRKesalahan", acFormatRTF, strTemplateLocation
End Sub
when i click the button..... the file save and report preview also open. what should I do if I don't want that report to preview.
 
Last edited:
tq.. I'm get the answer.
 

Users who are viewing this thread

Back
Top Bottom