Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning Access 2003 VBA
This is the forum to discuss the Wrox book Beginning Access 2003 VBA by Denise M. Gosnell; ISBN: 9780764556593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Access 2003 VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old December 15th, 2004, 09:52 PM
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?

Hi,

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,
Linn
  #2 (permalink)  
Old December 22nd, 2004, 08:07 PM
Registered User
 
Join Date: Dec 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi
Just got the book as well. There don't seem to be errors with Access 2003 in this chapter. Have you tried downloading the code from the web into Access 2002 which should tell you if the error is due to a typo or the version.


  #3 (permalink)  
Old December 23rd, 2004, 02:15 AM
Registered User
 
Join Date: Dec 2004
Location: Middleton, WI, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for replying cyfoes. I found my problem, I inserted a standard module instead of a class module back on step 2 on page 105. Just moving too fast for my own good. Once I inserted a class module and copied all the code over it worked fine.

Thanks,
Linn


  #4 (permalink)  
Old September 20th, 2005, 03:47 PM
Authorized User
 
Join Date: Apr 2005
Location: London, , United Kingdom.
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Linn and cyfoes

I have read your entries and I would love to know how you have both got on with book and would you recommend it?

Jacky KennA



Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom event not firing flegel ASP.NET 2.0 Professional 0 February 23rd, 2007 06:31 AM
Custom style class oldSkool BOOK: Professional ASP.NET 2.0 Server Control and Component Development ISBN: 978-0-471-79350-2 0 January 9th, 2007 03:39 AM
Ajax and Custom Class ~Bean~ ASP.NET 1.0 and 1.1 Professional 0 April 6th, 2006 12:33 PM
DataRow Vs Custom Class RM82 BOOK: ASP.NET Website Programming Problem-Design-Solution 2 April 3rd, 2004 06:01 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.