Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning Access VBA
This is the forum to discuss the Wrox book Beginning Access 2002 VBA by Robert Smith, Dave Sussman, Ian Blackburn, John Colby, Mark Horner, Martin Reid, Paul Turley, Helmut Watson; ISBN: 9780764544026
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning 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 August 13th, 2003, 11:27 AM
Registered User
 
Join Date: Aug 2003
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 7 Code

I am trying the exercise on Building an SQL string in Chapter 7 (Pages 289-291). I have copied the frmCriteria from the Complete Database as there is no frmCriteria for Chapter 7 as stated in the book.

A function BuildSQLString already existed which caused a conflict when trying to add the new identically named function so I deleted the existing function.

Now when I run the cmdFind_Click I receive a compile error stating wrong number of arguments or invalid property assignment with EntriesValid highlighted.

Does anyone have any suggestions?

 
Old August 13th, 2003, 11:46 AM
Registered User
 
Join Date: Jun 2003
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The EntriesValid wants an argument, but the actual function doesn't want one. In the cmdFind_Click event take the argument out from the call to EntriesValid, as in:
If Not EntriesValid Then Exit Sub
 
Old August 14th, 2003, 05:39 AM
Registered User
 
Join Date: Aug 2003
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The cmdFind_Click event previously included: -

If Not EntriesValid(strTableName) Then Exit Sub

by removing (strTableName) this has removed the error.

Thanks

 
Old February 2nd, 2004, 09:36 PM
Registered User
 
Join Date: Jan 2004
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Also; When coding the BuildSQLString Function, My tblSales table had no entries from 2002, yet the book asks you to use frmCriteria to build an SQL string from 01-Nov-02 to 30-Nov-02. Table entries are all 1998. Changed 02 to 98, all good. An easily detectable oversight for some, but it had me going for a bit. Grrr.

Dead
 
Old July 11th, 2004, 07:31 PM
Authorized User
 
Join Date: Jul 2004
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the tip, AlreadyDead!

Since the authors indicate that running the MakeQueryDef function in the Immediate window should return a value of true, I spent a lot of time trying to figure out why it kept returning a value of false. Having received no response to any of my prior posts, I didn't come back to this forum for help until just now and I'm glad I did.

Thanks, again!!!:)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Code by Chapter Jonathan BOOK: ASP.NET Website Programming Problem-Design-Solution 1 September 19th, 2003 02:56 PM





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