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: Access 2010 VBA Programmer's Reference
This is the forum to discuss the Wrox book Access 2010 Programmer's Reference by Teresa Hennig, Rob Cooper, Geoffrey L. Griffith, Jerry Dennison; ISBN: 978-0-470-59166-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Access 2010 VBA Programmer's Reference 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 May 28th, 2018, 03:10 PM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 25%
Activity: 25% Activity: 25% Activity: 25%
 
Join Date: May 2018
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Cascading Combo Box

Hello,
I'm trying to create a Cascading Combo Box similar to the one in CH13 pg.473-474, but when I try to run it, it gives me an error highlighting the Me!cboCounty in the ReplaceWhereClause.

The error shown is the "Compile error: Sub or Funcion not defined".

I'm not sure what is causing this error, but I do not understand what is the CountyCode referencing to.

Below is the complete code:

Option Compare Database
Option Explicit

Private Sub cboCounty_AfterUpdate()
Me!cboCity = Null

If IsNull(cboCounty) Then
Me!cboCity.Enabled = False

Else
Me!cboCity.Enabled = True
Me!cboCity.RowSource = ReplaceWhereClause(Me!cboCity.RowSource, _
"Where [tblCity].[CountyKey] = " & Me!cboCounty)
Me!cboCity.Requery
End If


End Sub
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
Combo box to display items from parent combo box Gini Visual Studio 2008 0 June 18th, 2008 12:30 AM
Cascading Combo Boxes in Excel 2007 kmmagee Excel VBA 0 October 26th, 2007 10:20 AM
Combo box choice creating filtered combo box stevensj5 Access 11 September 13th, 2007 11:33 AM
Cascading Combo Box Maureen227 Access 2 May 30th, 2006 05:42 AM
Cascading combo lists in continuous forms rjd97c Access 1 June 30th, 2004 02:51 PM



All times are GMT -4. The time now is 03:12 PM.


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