Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access 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
 
Old February 17th, 2004, 11:28 AM
Registered User
 
Join Date: Feb 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to dubs70 Send a message via MSN to dubs70
Default Access 2000 VBA problem


I am still new to VBA, so please bear with me. I have the Access 2002 VBA book and have been trying to follow an example for a WithEvents Class, and have come up with an error. Access 2000 doesn't understand the "m" setting. Is this an Access 2002 thing? Is there any way to accomplish the same thing in Access 2000? Se below for my code!! Thanks in advance for any help whatsoever!!

__________________________________________________ ___________
Option Compare Database
Option Explicit

Dim WithEvents mcboLookup As ComboBox
Dim mtxtProductNumber As TextBox
Dim mform As Form

Public Function init(lform As Form, lcboLookup As ComboBox, ltxtProductNumber As TextBox)
    Set mfrm = lform
    Set mtxtProductNumber = ltxtProductNumber
    Set mcboLookup = lcmdLookup
    mcmdLookup.AfterUpdate = "[Event Procedure]"

End Function


Sarah W
NGIT

 
Old February 17th, 2004, 07:35 PM
Authorized User
 
Join Date: Jun 2003
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sarah,

Just looking at the code from a syntax point of view, in the first line of the proc change 'mfrm' to 'mform'.

There also seems to be problem with the last line of code...change mcmdLookup to mcboLookup

HTH,
Mike
 
Old February 18th, 2004, 11:38 AM
Registered User
 
Join Date: Feb 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to dubs70 Send a message via MSN to dubs70
Default

Thanks Dataman!! That was it. I feel stupid it was such an easy solution!! :)

Sarah W
NGIT

Sarah W
NGIT





Similar Threads
Thread Thread Starter Forum Replies Last Post
Solutions Database in Beginning Access 2000 VBA watrout BOOK: Beginning Access VBA 1 October 23rd, 2006 10:42 AM
Half the code in Access 2000 VBA doesn't work disruptivehair BOOK: Beginning Access VBA 0 December 26th, 2005 02:21 PM
Access 2000 VBA Chapter 3 Problem Pauldowsett BOOK: Beginning Access VBA 3 January 30th, 2005 03:06 PM
ACCESS 2000 VBA CODE TO "SAVE AS" EXCEL ckentebe Access 0 May 25th, 2004 02:13 PM
Access XP VBA compatibility issues w/ Access 2000 bourgeois02 Access VBA 1 August 19th, 2003 04:14 PM





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