Wrox Programmer Forums
| 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 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
  #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: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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


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





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