Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access 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
 
Old December 19th, 2005, 03:03 PM
Registered User
 
Join Date: Dec 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Forms Question

I'm trying to create a form where there will be two drop down boxs. The available choices in the 2nd dropdown will be dependant on what you choose in the first dropdown. For instance If the first field allowed you to choose the state. The 2nd field would then give you a list of cities in that state that you could choose from. I'm having a tough time trying to set this up and any advice on how to this would be helpfull.

thanks in advance.
Mike

 
Old December 19th, 2005, 10:02 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Hi Mike:

Private Sub cboState_AfterUpdate()
    Me.cboCity.RowSource = "SELECT CityName FROM tblCity WHERE StateID = " & cboState.Column(0)
End Sub

HTH,

Bob


 
Old December 20th, 2005, 08:27 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

You may also wish to do a search at the MS Access Developer Center for "cascading combo boxes."

http://www.msdn.microsoft.com/office...anding/access/


mmcdonal
 
Old December 23rd, 2005, 12:22 PM
Registered User
 
Join Date: Dec 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Perfect. Thanks for the help guys.






Similar Threads
Thread Thread Starter Forum Replies Last Post
question about forms danastasio Classic ASP Databases 0 October 1st, 2007 01:04 PM
continuous forms question hamffjs Access 3 January 29th, 2007 01:33 PM
Forms question satts Access 3 February 18th, 2005 05:01 PM





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