Report NoData Event

andycrfc13

New member
Local time
Today, 14:03
Joined
Aug 12, 2010
Messages
9
I have tried to enter some code into the NoData event on one of my reports, the code is as follows.

Code:
Private Sub Report_NoData(Cancel As Integer)
MsgBox "No Data"
On Error Resume Next
Cancel = True
End Sub

I can run this code and it works fine but when i try to save the report i get an error saying:
"You tried to commit or rollback a transaction without first beginning a transaction"

Does anyone know what the problem may be?
 
First of all, using On Error Resume Next makes it almost impossible to figure out the true source of the error. Put a decent error handler in just to return the applicable information. It may be that this part is not causing you the problem but is, in fact, in your code which calls the report.
 
Thanks SOS

I actually got it working with the code that I had tried originally. It turns out that my report had come corrupt somehow, luckily i had a backup of the system. However i will still take your suggestion and try and work with it
 

Users who are viewing this thread

Back
Top Bottom