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

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,300
Office Version
  1. 365
Platform
  1. Windows
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?
 

btrede

Board Regular
Joined
Oct 4, 2005
Messages
87
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
 

Forum statistics

Threads
1,136,366
Messages
5,675,355
Members
419,565
Latest member
Phil57

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
Top