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 January 13th, 2004, 03:57 PM
Registered User
 
Join Date: Jan 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Compile Error

I am getting a Compile Error when I try to use the buttons after Access converts the macros to VBA code in the beginning exercises in the " Access 2000 Beginning VBA" book. The error reads Can't find project or library. Also, After converting the macros to VBA on pages 73-75 the buttons no longer function at all. I get the following message in the IDE upon pressing any button in the frmCompany (First,Next,etc): "Compile error: Can't find
> function or library". the debugger shows 'Private Sub cmdNext_Click()'in
> the cmdNext_Click sub highlighted in yellow and 'Error$' highlighted in
> gray. Have tried redoing all steps.



 
Old January 13th, 2004, 04:00 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 174
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you are using Access 2000, make sure you have service packs 1 & 3 loaded as there was a corruption issue fixed with the sp's. Anytime you copy & paste code from an existing form, report or module you need to debug & compile before saving, unless you have the sp's loaded.

Regards,

Beth M
 
Old January 13th, 2004, 04:01 PM
Authorized User
 
Join Date: Dec 2003
Posts: 81
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Have you checked the event properties of the button to make sure the onClick() event is pointing to the right code.

In design mode select the button, right click, select properties, select event then press the ... button in event onClick

this should take you to the vb code

Cheers

Let me know if this helps






Similar Threads
Thread Thread Starter Forum Replies Last Post
compile error yogeshyl Excel VBA 0 December 12th, 2007 06:41 AM
Compile error: Syntax error: & Else without HELP Corey VB How-To 2 April 21st, 2006 03:25 PM
Compile error johnkruse Access VBA 3 June 16th, 2004 05:06 PM
Compile Error: Michael Gavel BOOK: Beginning Access VBA 2 January 20th, 2004 11:36 AM
compile error burdickdave C# 1 October 20th, 2003 01:46 PM





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