Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
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 October 23rd, 2007, 05:34 PM
Authorized User
 
Join Date: May 2007
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with workspace procedures from VBA book

I am having difficulty with the workspace procedure listed in appendix I of access 2003 VBA book when I convert it into a procedure as part of a module. There are about 30 forms which will use it so it made sense to put it in a module rather than a class module.

i get the error 2460 or 2465 when i click OK

The code is copied exactly, however its the form variable that i am having problem with. I am trying to use it in access 2000 as that's the version i have to work with.

I need to be able to use it with subforms as well as within a tabcontrol.

public sub workspace(ctl as control fm as form)

The only item the form variable it seems to accept when called is Me

This is probably a basic point that i'm missing. I've looked around through my myriad of books for examples to see if i can spot my mistake, so that i can carry on writing the code for other forms.


 
Old October 23rd, 2007, 08:47 PM
Registered User
 
Join Date: Oct 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I don't have much time, but try putting a comma between your variables in the declartion of the procedure as in;

ctl as control, frm as form

Good luck...Bill

 
Old October 24th, 2007, 03:33 AM
Authorized User
 
Join Date: May 2007
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

that was my quick typing unfortunately, apologies on that

the opening statement does read

public sub workspace (ctl as control, fm as form)

 
Old October 26th, 2007, 06:53 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Can you tell me which book you are using and which page? Also post the ISBN if you have it. I will take a look at the pages where you are finding this example.


mmcdonal

Look it up at: http://wrox.books24x7.com
 
Old October 26th, 2007, 12:51 PM
Authorized User
 
Join Date: May 2007
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The book is wrox's Access 2003 VBA Reference Book

Its appendix I

I tried putting a post in the books forum, however no-one seems to be subscribed to that forum anymore



 
Old October 26th, 2007, 01:01 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

That looks like a pretty large index. Can you reference where you are getting the code? What is the heading of the section?


mmcdonal

Look it up at: http://wrox.books24x7.com
 
Old October 26th, 2007, 01:55 PM
Authorized User
 
Join Date: May 2007
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The subsection within appendix i is "pop up memo field workspace with spell checker"






Similar Threads
Thread Thread Starter Forum Replies Last Post
Workspace of Appendix I jeremy1048 BOOK: Access 2003 VBA Programmer's Reference 0 October 23rd, 2007 05:28 PM
Great Access VBA Book John Parker Access VBA 1 December 11th, 2006 07:41 PM
excel 2003 vba book xeugx Excel VBA 3 June 27th, 2005 11:35 PM
Biginer VBA Book for Excel - Download roomi Excel VBA 0 January 15th, 2005 05:21 AM
Which Book for VBA/Access/SQL/Excel? rmg VB Databases Basics 0 July 29th, 2004 03:19 PM





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