Error Message

R

Randy

Can anyone tell me what might be wrong with this? I keep getting an error
message and everything seems to be in order. Maybe I'm missing something!

Private Sub Report_Open(Cancel As Integer)
DoCmd.OpenForm "Report Range", , , , , acDialog, "Attendance Summary"
If Not IsLoaded("Report Range") Then
Cancel = True
End If
End Su
.......................................................................................
The error message I get states:
Complie Error:
Sub or Function not defined
 
D

Dave Allan via AccessMonster.com

Yeah, your problem is that IsLoaded isn't a method or function, it's a
property.

You need something like:

dim frmReport as form
set frmReport = Forms![Report Form]

if frmReport.isloaded then

etc etc

hope this helps!

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top