473,757 Members | 8,085 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Combo box dependent on another combo box, text part is blank

Hi,

I have a form with several combo boxes, continuous form format, with
record source a query off an Item Table. The fields are Category,
Subcategory, and Color. I am displaying descriptions, not ID's, so I
have to convert the ID's from various lookup tables.

The combo boxes work fine except for subcategory, which is dependent on
category. Depending on category, the drop-down box for subcategory
will display different items. (for example, when Category is
Furniture, Subcategory will display drop-down list of 'Dresser,
Nightstand, Desk...". Without clicking on the drop-down box,
subcategory will display in its text area the Description of the
subcategory ID of the existing record on the table.

The drop-down list for Subcategory works fine. However, the text
portion is blank for records on the 2nd category. In other words,
there are 10 records for the first category, Accessories. Subcategory
displays fine for these. But for the 11th record and subsequent
records, subcategory is blank (text portion, although drop-down works
correctly).

If I just display subcategory ID, and not convert to description, it
works fine.

My SQL statement for subcategory is:
"SELECT ItemSubcatID, ItemSubcatDesc FROM tlkpItemSubcate gory
WHERE (((ItemCategory ID)=[Forms]![frmItems]![cboItemCategory]))
ORDER BY ItemSubcatDesc; "

Column count is 2, column width is 0, 2. Bound column is 1.
I think the problem lies around here. When I have column width =
"1,1", I can see that my subcatgegory ID is displayed correctly.

I do a requery of subcategory on category_afteru pdate and
category_change ... but the combo boxes drop-down part seem to be
working fine.

If I run just the query that's the record source, it displays
subcategories correctly.

What would cause the text portion of my combo box to be blank?

Thanks in advance for any help,
Lori

Dec 16 '05
10 9574
On Wed, 21 Dec 2005 19:21:13 GMT, Lorirobn <an*******@devd ex.com>
wrote:
Hi Mike,
I will try my best to abort the infinite loop! ...
If you say that you will be displayingdescriptions that is fine. But what does "in addition to the ID's" mean?
That sounds like you are using the ID's as the bound column.

What I meant was: I was originally just displaying descriptions. But because you said I
could do what I wanted to do only if the bound column for the combo box
is displayed, that's when I thought "ok, then I will display the ID,
also".
That isn't what I meant to say, even if I said it.

What I meant to say is that the bound column must be what is
displayed. If you want to bind the ID, that is fine, as long as you
display the id. If you want to display the description, however, you
need to bind the description.

This is easier said than done.

It requires denormalizing your data.

It requires using the description as the "key".

It is less than optimal (as I previously indicated).
But, even when I was displaying descriptions, I did actually use
the ID's as the bound column.
Ooopsies.
Is this not correct?
Yes, it is not correct.
Could that be the
cause of my problem?
Indeed.
You can view my sql at the beginning of this
thread. It shows that I use the ID as my bound column. I am afraid this is as clear as mud????
I think it would be clearer to you if you re-read each message,
parsing each word. These things tend to get jumbled up on a quick
read.
You do this by changing the rowsource of the dependent combobox in the

after update routine of the first combobox.

What do I change the row source to? I have been doing a requery.


That works.
Thanks once again. Hope it's clearer. Thanks for sticking through the
infinite loop with me.


Let us know if it works.

mike
Dec 21 '05 #11

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

Similar topics

8
18392
by: Lyn | last post by:
Hi, Can anyone tell me how the initial value displayed in Combo Box is determined when a form is opened? I am loading the dropdown from one field ("CategoryName") of a table, with "ORDER BY ". The values in the dropdown are loaded in the correct order, but the initial value is not the first row of the dropdown as I expected. The field "CategoryName" is not the primary key for the table -- the PK is
10
1911
by: Richard | last post by:
I have created a form which sets up a dataview. The form views one record at a time using a currencymanager. This works fine. All my text boxes bind. However I have a combo box which gets its lookup values from another (Advertising) table (AdvertisingID, Advertising). This works .. However, where it doesn't work as well is when the form loads, the combo boxes should bind to the AdvertisingID field and display the respective data.
6
11781
by: CindyH | last post by:
Hi Does anyone know how to create a multi column combo box from the same table? Thanks, Cindy
9
6761
by: Edwinah63 | last post by:
Hi everyone, Please let there be someone out there who can help. I have two BOUND combo boxes on a continuous form, the second being dependent on the first. I have no problem getting the second combo to change depending on what values the user selects in the first box, it's just that every time the user changes the first combobox, the second combobox FOR EVERY RECORD goes blank.
8
8263
by: salad | last post by:
I was wondering how you handle active/inactive elements in a combo box. Let's say you have a combo box to select an employee. Joe Blow has been selected for many record however Joe has left the company and has been flagged inactive. If you have a filter on the rowsource like Where Active = True then Joe's name would not show up in the combo list. This would be fine if the combo is associated with a field that is null/0. It would not be...
8
2203
by: AA Arens | last post by:
Hi I do have a products table and products-parts table in my Access 2003 database and log all services into a form. I do have at least the following two combo boxes on my form: - Choose Product where as the Row Source (See properties): SELECT tblProducts.ProductName, tblProducts.ProductName FROM tblProducts ORDER BY ProductName;
4
3032
by: Swinky | last post by:
I am trying to make a combo box dependent on a text box. I cannot get the combo box to pull the related data from the text box. I have been all over this user group & have tried several versions of code to no avail. I would like to display all contact names (in the combo box) related to the customer number in the text box. Here's what I have:
4
3479
by: shreyansghia | last post by:
Hello , I ve a form which is based on a table viz SalesOrder. 1 of the field which Sales Order has is : Client. I ve 2 more tables, (a) Client which has 1 field viz ClientName , (b) ClientDetails which has 2 fields ClientName and Address. The tables are linked ( the link being client name) . This ofcourse means , a particular client could ve multiple addresses. Every time a sales order is excuted , the equipments need to be...
4
2189
by: deanndra | last post by:
First, I want to say thank you to Scott and the others who replied to my first post here. I had to put that database on hold for the moment when I was tasked with a new one. I am building another database from scratch. This one is for job announcements. I've built only 2 tables (I know this is a no-no, but it was demanded by those wanting this database so I've complied). The field name properties and data types in both tables are virtually...
0
9489
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
9298
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,...
0
10072
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9906
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9885
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
5172
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3829
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
3
3399
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.