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

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
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,217,383
Messages
6,136,244
Members
450,001
Latest member
KWeekley08

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