Report - 2501 Error (1 Viewer)

LenseOnLife

New member
Local time
Today, 07:03
Joined
Mar 19, 2019
Messages
3
Hi,

First time posting here so hope I remember to include everything.

I've stripped back all the rubbish and now down to the bare essentials. Report header has 2 controls txtCustomerName and txtTransactions. While these will be populated through OpenArgs, I currently setting them in the Report_Load event.

Option Compare Database
Option Explicit

Private Sub Report_Load()
Me.txtCustomer = "MyCustomer"
Me.txtTransactions = "99"
End Sub

Testing the report using 'Print Preview' is fine - see '00 ReportHeader' attached

Running the report from the form

DoCmd.OpenReport ReportName:="rptMouldingUsed_Customer"

I get the Runtime error 2501 and it is driving me mental. Especially since this is not the original problem I was trying to sort out !!!!!

Any ideas anyone?

Cheers,

Oliver
 

Attachments

  • 00 ReportHeader.jpg
    00 ReportHeader.jpg
    68.9 KB · Views: 75

LenseOnLife

New member
Local time
Today, 07:03
Joined
Mar 19, 2019
Messages
3
Re: keep getting this error Run time error 2501 This SendObject action was canceled

Hi,

Would love to be able to explain what I did to get it working - but no idea. MIGHT have been closing access and starting again. No idea, suffice to say that error has disappeared.

Oliver
 

Ranman256

Well-known member
Local time
Today, 03:03
Joined
Apr 9, 2015
Messages
4,339
use a form, with textboxes.
have the report query read these boxes as field in the query,
select forms!myForm!txtCustomer as Cust from table

report on these fields.
 

Users who are viewing this thread

Top Bottom