Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA 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 March 13th, 2006, 01:07 AM
Authorized User
 
Join Date: Jun 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Progressive list boxes

I have a table with cost of living for every city in a region. I am trying to create a form which has a list box for Country, State & City, with State and city list box being disabled at first. So, when i first select the country name, the state list box has to become active and list all the states in that country alone, and after choosing the state the city list should list the various cities in that state alone.

Autofilter does that but I want to setup a form which will pull this info into a worksheet to do some calculation based on it. I would appreciate if someone could help.

Thanks.

 
Old March 15th, 2006, 08:03 AM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

Iam not sure if your are referring to data form. You can use it for setting criteria and display one record at a time

 
Old March 15th, 2006, 10:13 AM
Authorized User
 
Join Date: Jun 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Actually, I'm trying to create a form which will have 3 list boxes with 1st.Country, 2nd.State & 3rd.City. So when I first select the country list box, the state list should be populated with only the states of that country alone, then after choosing the state, the city list box should be populated with the cities in that state alone. I am trying to setup a form which would do this.

 
Old March 27th, 2006, 10:11 AM
Registered User
 
Join Date: Mar 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

To solve this problem I would recommend looking into having the tables and the form in seperate files (You could keep them in seperates sheets or named ranges if you want).

Then connect to the table via AD0, pulling only the data you need when you need through SELECT statements and populate the listbox.

QB







Similar Threads
Thread Thread Starter Forum Replies Last Post
LIST BOXES Vision G Access 10 May 27th, 2006 01:45 AM
List Boxes, Help! JeffGirard Access 17 August 22nd, 2005 01:31 PM
SQL , List Boxes/Menu Boxes, DB's Ginzu3 Classic ASP Databases 1 June 30th, 2003 04:07 AM





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