Combo Box Result

  • Thread starter Thread starter Gary Dolliver
  • Start date Start date
G

Gary Dolliver

Hi all,
I have two unbound combo boxes (c1 and c2) that based on the value of c1,
will determine what shows for c2. By selecting c1, it will correctly limit to
what c2 shows, but when I select the option for c2, it is not choosing the
correct value. The result set for c2 is based off a table, that has the
following format:
ISID ISD ITID
1 red 1
2 blue 1
3 green 1
4 red 2
5 blue 2
6 green 2
c1 will select the ITID, which then limits what I see in c2 to the correct
set (I even brought in the ISID column to make sure the numbers are correct)
- however, when I select and ITID of 1 and then "red", instead of showing 1,
it shows 4 - I have a feeling it is because the field names are the same, but
am unsure how to move forward? Any help is appreciated, thanks
-gary
 
Gary Dolliver said:
Hi all,
I have two unbound combo boxes (c1 and c2) that based on the value of c1,
will determine what shows for c2. By selecting c1, it will correctly limit
to
what c2 shows, but when I select the option for c2, it is not choosing the
correct value. The result set for c2 is based off a table, that has the
following format:
ISID ISD ITID
1 red 1
2 blue 1
3 green 1
4 red 2
5 blue 2
6 green 2
c1 will select the ITID, which then limits what I see in c2 to the correct
set (I even brought in the ISID column to make sure the numbers are
correct)
- however, when I select and ITID of 1 and then "red", instead of showing
1,
it shows 4 - I have a feeling it is because the field names are the same,
but
am unsure how to move forward? Any help is appreciated, thanks


Something's screwy. Please post the RowSource properties of the two combo
boxes and explain how you limit the second combo based on the first. And
what do you mean when you say that you select "red" but "instead of showing
1 it shows 4" -- what is the "it" in this case?
 
Thank you so much for the reply and sorry this took so long to get back to you.

The first combo box determines the Item_Type_ID (ITID) and the row source
is: Item_Type (Table) - the numeric value from this combo box then fills into
a text field [ITID] that is then used in the WHERE clause for the second
combo box (I made this so I could make sure it was selecting the correct
value)

The second combo box determines the Item_Style_ID (ISID) and the row source
is:
SELECT Item_Style.Item_Style_Description, Item_Style.Item_Style_ID,
Item_Style.Item_Type_ID FROM Item_Style WHERE
(((Item_Style.Item_Type_ID)=forms!RECEIVING_REDO_Check_In!ITID));

I have the second combo box showing both the Item_Style_Description
(Description = Red) and the ISID (ID = 1) and I have another text box that
populates the ISID (into text field [ISID]) from what is selected from the
second combo box. However, in the text field ISID, it shows the value 4 -
which is also Red, however, it is for Item_Type_ID 2, where I already
selected Item_Type_ID 1 from the first combo box.

Hope that makes sense, please let me know if you need anything else, thanks
again

-gary
 
Back
Top