IsLoaded isn't a built-in function. Check your old database for the code,
and copy it into your new one.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
"Rene" <(E-Mail Removed)> wrote in message
news:922A5895-E7F3-4F51-AAED-(E-Mail Removed)...
>A visual basic function I used in Access 03 is not working in Access 07.
>
> Basically, I copied and pasted the following code into the On Open and On
> Close Event of the report, as I'm transferring everything from Access 03
> to
> 07:
>
> --------------------------------------------------------------
>
> Option Compare Database
>
> Private Sub Report_Close()
> DoCmd.Close acForm, "rptdlgfrm_Date Range"
> End Sub
>
> Private Sub Report_Open(Cancel As Integer)
>
> bInReportOpenEvent = True
>
> DoCmd.OpenForm "rptdlgfrm_Date Range", , , , , acDialog
>
> If IsLoaded("rptdlgfrm_Date Range") = False Then Cancel = True
>
> bInReportOpenEvent = False
>
> End Function
>
> --------------------------------------------------------------
>
> When I run the report, the visual basic window comes up and displays the
> following message:
>
> Compile error: Sub or Function not defined.
>
> --------------------------------------------------------------
>
> Please help.
>
> Rene
>
>