Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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?

Reply With Quote
  #2 (permalink)  
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
Reply With Quote
  #3 (permalink)  
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

Reply With Quote
  #4 (permalink)  
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
Reply With Quote
  #5 (permalink)  
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!!!:)

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:01 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.