Error Question

btrede

Board Regular
Joined
Oct 4, 2005
Messages
87
Would anyone be able to explain this error to me. I have check all over msdn.com and have not been able to figure this out.

Here is the message along with the code for this report. for the OnOpen event:

243299135_d3bc09fe74_o.jpg


Code:
Private Sub Report_Open(Cancel As Integer)
    DoCmd.OpenForm "Date Form", , , , , acDialog, "Net Rebates by Part by Date Range"
    If Not IsLoaded("Date Form") Then
        Cancel = True
    End If
End Sub

I get this error when I try to close the report.

I appreciate any help anyone can give.

regards.

BT
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
BT

You say you get the error when you close the report but you've posted the code for it's Open event.

Can you post the code if any that runs when the report closes?
 
Upvote 0
Re: Error

BT

You say you get the error when you close the report but you've posted the code for it's Open event.

Can you post the code if any that runs when the report closes?

Here is all the code for the report:

Code:
Private Sub Report_NoData(Cancel As Integer)
    MsgBox "There is no data for this report. Canceling report..."
    Cancel = -1
End Sub

Private Sub Report_Close()
    DoCmd.Close acForm, "Date Form"
End Sub

Private Sub Report_Open(Cancel As Integer)
    DoCmd.OpenForm "Date Form", , , , , acDialog, "Net Rebates by Part by Date Range"
    If Not IsLoaded("Date Form") Then
        Cancel = True
    End If
End Sub

Thanks Norie!

:biggrin:

Bradley
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,478
Members
448,967
Latest member
visheshkotha

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top