473,804 Members | 3,201 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1592
On Mon, 29 May 2006 13:45:58 GMT, "RICHARD BROMBERG" <no*****@att.ne t>
wrote:

In cmboCity.AfterU pdate event, write:
cmboStreet.Requ ery

-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.c om...
On Mon, 29 May 2006 13:45:58 GMT, "RICHARD BROMBERG" <no*****@att.ne t>
wrote:

In cmboCity.AfterU pdate event, write:
cmboStreet.Requ ery

-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
1607
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 other combo box.In fact Application is selected based on Group,Division & Names.But in many cases there are Divisions which do not have any Names. I need to select Applications either on two conditions,one if Names are available, which...
4
12858
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 achieved.
1
2135
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 the first "C" choice is highlighted and the drop down is still active, allowing me to click the one I really want: ("Charlie" and not "Carl"). On other boxes, the first selection is hightlighted and the drop down is set inactive leaving me with...
2
1899
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 mastercard is selected I would love some text boxes to appear for credit card details. I did it with check boxes but cant make it go for combo boxes. Thanks for any help. Eddie
6
3685
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
3272
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 selecting from the combo box, I have all the combo boxes, using afterupdate, populating their respective list boxes. These text boxes are directly correlated to the combo box selection using SQL. Here is an example from the afterupdate event in the...
3
6189
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 for the selected items from the first combo box and also to the items selected from the second combo box? because i want to retrieve them in a search page ex: Combo box1:"Fruits","drinks","vegetables". Combo box 2:"apple","banana","mango". when...
2
1780
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 80,000+ invoices in this particular db, clicking the dropdown is painfully slow accross a network only (I'm testing on a wireless, so it's even slower still). All fields are properly indexed, such as the invoice number (sort descending), etc. I've...
2
3281
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 Dept ID (PK) Dept Name Section ID Table 2 - Section
0
9705
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9576
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10311
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10074
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7613
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6847
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4292
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3813
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2988
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.