473,396 Members | 1,780 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Double Selection combo boxes


I have a table which contains a City field and a Street field and some other
fields.

The main form has two combo boxes cmboCity and cmboStreet

I want to select a city from then cmboCity combo box and have the cmboStreet
combo box
populated with the Street from that city.

The program only works one time. That is, I select a city from cmboCity and
the cmboStreet
populates with all the streets in that city.

If I then relelect a differant city from cmboCity there is no change in
CmboStreet. When selected it keeps the old street list.

I have to reload the whole program to select a differant city.

Here are the row sources for each combo box

cmboCity SELECT DISTINCT [city] FROM Mail_List;

cmboStreet SELECT DISTINCT [street] FROM Mail_List WHERE
[Mail_List].[city]=[Forms]![frmMain]![cmboCity];

Any idea what is wrong ??

May 29 '06 #1
2 1579
On Mon, 29 May 2006 13:45:58 GMT, "RICHARD BROMBERG" <no*****@att.net>
wrote:

In cmboCity.AfterUpdate event, write:
cmboStreet.Requery

-Tom.


I have a table which contains a City field and a Street field and some other
fields.

The main form has two combo boxes cmboCity and cmboStreet

I want to select a city from then cmboCity combo box and have the cmboStreet
combo box
populated with the Street from that city.

The program only works one time. That is, I select a city from cmboCity and
the cmboStreet
populates with all the streets in that city.

If I then relelect a differant city from cmboCity there is no change in
CmboStreet. When selected it keeps the old street list.

I have to reload the whole program to select a differant city.

Here are the row sources for each combo box

cmboCity SELECT DISTINCT [city] FROM Mail_List;

cmboStreet SELECT DISTINCT [street] FROM Mail_List WHERE
[Mail_List].[city]=[Forms]![frmMain]![cmboCity];

Any idea what is wrong ??


May 29 '06 #2
Tom

Thanks for the help
"Tom van Stiphout" <no*************@cox.net> wrote in message
news:1q********************************@4ax.com...
On Mon, 29 May 2006 13:45:58 GMT, "RICHARD BROMBERG" <no*****@att.net>
wrote:

In cmboCity.AfterUpdate event, write:
cmboStreet.Requery

-Tom.


I have a table which contains a City field and a Street field and some otherfields.

The main form has two combo boxes cmboCity and cmboStreet

I want to select a city from then cmboCity combo box and have the cmboStreetcombo box
populated with the Street from that city.

The program only works one time. That is, I select a city from cmboCity andthe cmboStreet
populates with all the streets in that city.

If I then relelect a differant city from cmboCity there is no change in
CmboStreet. When selected it keeps the old street list.

I have to reload the whole program to select a differant city.

Here are the row sources for each combo box

cmboCity SELECT DISTINCT [city] FROM Mail_List;

cmboStreet SELECT DISTINCT [street] FROM Mail_List WHERE
[Mail_List].[city]=[Forms]![frmMain]![cmboCity];

Any idea what is wrong ??

May 30 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Rob | last post by:
Hello, I am developing an A2K application.In the subform ,I have around 4 combo boxes for Group,Division,Name and Application.The selection criteria of each combo is narrowed based on the value of...
4
by: godber | last post by:
I need to populate text boxes for instance with employee information using their unique employee works number selected from a combo box. Can anyone help, I am told thru visual basic this can be...
1
by: Hank | last post by:
On various forms I have combo boxes with preloaded selections. I click the down arrow to display the choices. On some of the boxes, if I type the first letter of the selection (Lets say "C") then...
2
by: ebasshead | last post by:
Hi everyone, I'm having trouble getting my head around how to make a text box appear from a combo box selection. The combo box lists methods of payment eg cash, visa, mastercard. If visa or...
6
by: Dave | last post by:
I want to put the information that the user selects in my combo boxes into a subform that lies on the same form as the combo boxes. Thanks for your help already, Dave
2
by: Dave | last post by:
I have 3 tables of information feeding into 4 combo boxes on my main form (DR Form). I have as many list boxes (acting as text boxes) as there are fields in each one of the 3 tables. Once...
3
by: Alo2aaa | last post by:
Dear all i have two linked combo boxes (master/child) ,the user wants to have multiple selection from both combo boxes , can u tell me how can i store them in a way that i can have a unique id...
2
by: ARC | last post by:
I'm testing a user's db that contains a very large number of records. I have an invoice screen, with an invoice select dropdown box that shows all invoices, and the customer's name, etc. With...
2
by: Orbie | last post by:
Hey Guys, I'm new to VB.NET and looking for some help with combo boxes. I was wondering if it is possible to link 2 combo boxes to each other based on user selection? Example: Table 1 - Dept...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.