Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | 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
Thread Tools Search this Thread 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: 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

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

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

End Sub
Reply With Quote

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
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 08:57 AM.

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