Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > BOOK: Beginning Access VBA
Password Reminder
Register
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 Display Modes
  #1 (permalink)  
Old August 5th, 2008, 11:18 AM
Registered User
 
Join Date: Aug 2008
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default MakeQueryDef - error message

I've been trying to use the example on p. 253 of Beginning Access 2000 VBA on a db I'm working on and it gives me a user-type not defined error message. Has anyone had the same problem? and how did you solve it? Thank you much!

This is the code:

Function MakeQueryDef(strSQL as String) As Boolean

Dim qdf as QueryDef

If strSQL = " " Then Exit Function

Set qdf = CurrentDB.CreateQueryDef("qryExample")
qdf.SQL = strSQL
qdf.Close
RefreshDatabaseWindow

MakeQueryDef = True

End Function
Reply With Quote
  #2 (permalink)  
Old February 21st, 2009, 04:38 PM
Authorized User
 
Join Date: Jul 2008
Location: Portland, OR, USA.
Posts: 38
Thanks: 1
Thanked 2 Times in 2 Posts
Default

This is an old post but I'll answer in hopes of helping someone out in the future if they come across this.

The likely problem was that Access 2000 doesn't have a DAO reference assigned by default and since this is DAO code that was posted, it would be necessary to make sure to add a reference to Microsoft DAO 3.x (where x is a number like 51 or 6).
__________________
Thanks,

Bob Larson
Access MVP (2008-2010, 2011)
Free Access tutorials, samples, tools
Reply With Quote
Reply


Thread Tools
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
What is the error message for a 500 server error? chobo2 C# 2005 1 May 4th, 2008 03:11 AM
ERROR MESSAGE underbuchha Visual C++ 2005 0 September 30th, 2006 02:50 AM
Where does the error message go? Wei Wang BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 March 13th, 2006 01:03 PM
Error Message alannoble26 Excel VBA 4 November 25th, 2005 10:20 AM
Help with Error message mariakovacs Classic ASP Databases 3 October 10th, 2003 03:59 PM



All times are GMT -4. The time now is 06:07 AM.


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