View Single Post
  #1 (permalink)  
Old December 15th, 2004, 09:52 PM
lkubler lkubler is offline
Registered User
Join Date: Dec 2004
Location: Middleton, WI, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default creating an event for a custom class?


Just got this book and am quite pleased with it so far. I'm in chapter 4 and am trying to create the event for the Car class and I'm having trouble.

Here's what is happening:
On page 111 it says to declare the event with the "public event" statement in the general declarations section of the clsCar class module. When I enter the following line in the general declarations section:

Public Event ActionSuccess(strMessage As String)

I get this error:
Compile Error: Only valid in object module

Anyone have any suggestions? I'm using Access 2002, could this be a difference between 2002 and 2003? Or is this an error in the book possibly?

Thanks in advance for any help,
Reply With Quote