How BeginTrans .. work in printing (1 Viewer)

FuzMic

DataBase Tinker
Local time
Today, 20:08
Joined
Sep 13, 2006
Messages
719
Hi gurus

I use the following coding to BeginTrans > CommitTrans > RollBack to print a report from Tabloid from data in the BackEnd to a LAN printer.

Due to my limited knowledge
  1. I would like to know the interaction between the Tabloid and the LAN printer
  2. Is there any point to use this cycle for printing of the data in the Back End mdb.
  3. How the buffer of the printer come into the process?
  4. Any views on my codes

Grand Thank You first




Sub DoReport()
Dim ws As DAO.Workspace

DoReport = False

Set ws = DBEngine.Workspaces(0)
ws.BeginTrans

Docmd.openreport "ReportA", acNormal

ws.CommitTrans
DoReport = True

Trans_Exit:
Set ws = Nothing
Exit Sub

RErr:
If Not DoReport Then
ws.Rollback
End If
Resume Trans_Exit
end sub
 

Ranman256

Well-known member
Local time
Today, 08:08
Joined
Apr 9, 2015
Messages
4,337
None of the Tans events are needed for a report.
no code is needed.

just use:
Docmd.openReport "ReportA", acNormal
 

FuzMic

DataBase Tinker
Local time
Today, 20:08
Joined
Sep 13, 2006
Messages
719
So I would imagine since no update of data, is it correct?

Sent from my HTC_PN071 using Tapatalk
 

Users who are viewing this thread

Top Bottom