3rd combo box

macattack

Registered User.
Local time
Today, 02:00
Joined
Jan 5, 2013
Messages
35
Simple issue but I have spent hours and hours trying to find the answer and I have come up empty-handed.

I need the 3rd combo box to be cascaded off the 2nd. The 3rd is to display the ID based off what the 2nd combo box is. For some reason when I copy the steps I took to cascade the 2nd and try to apply them to the 3rd, it just doesn't work.

First cmb:
SELECT ATU.[Serial #], ATU.[Serial #] FROM ATU GROUP BY ATU.[Serial #], ATU.[Serial #] ORDER BY ATU.[Serial #];
Second cmb:
SELECT ATU.JCN, ATU.JCN FROM ATU WHERE (((ATU.[Serial #])=[Forms]![Single]![Serial])) GROUP BY ATU.JCN, ATU.JCN ORDER BY ATU.JCN;
Third cmb:
SELECT ATU.ID, ATU.ID FROM ATU WHERE (((ATU.JCN)=[Forms]![Single]![cmbJCN])) GROUP BY ATU.ID; (this is different because I've been playing around with it non-stop trying to find something that would work).

I'd greatly appreciate any help with this or any other ways of doing it.

Thanks!

Edit: I don't even need it to be a combo box, I just need to know the ID and this seemed like it'd be simple...
 
If you can pick up the ID as part of the Row Source of your Second combo, you could use the following in the Control Source of an unbound text box;
Code:
=YourSecondComboName.Column([B][COLOR="Red"]x[/COLOR][/B])

Where x represents the column number that hold the data you wish to display. Remember that the columns in a combo or list box for that matter are numbered from Zero on up. The column does not necessarily need to be visible it just needs to form part of the Row Source.
 
If you can pick up the ID as part of the Row Source of your Second combo, you could use the following in the Control Source of an unbound text box;
Code:
=YourSecondComboName.Column([B][COLOR=red]x[/COLOR][/B])

I tried to throw in the ID and tried columns 0-6 and couldn't get it to show.

on cmbJCN change:
Me.txtID.Value = Me.cmbJCN.Column(0)
This doesn't even show the value from JCN (regardless of the number I try).

row source:
SELECT ATU.JCN, ATU.JCN FROM ATU WHERE (((ATU.[Serial #])=[Forms]![Single]![Serial])) GROUP BY ATU.JCN, ATU.ID;
 
Simply post the code I gave you into the control source of the text box.

attachment.php


You can either do it directly into the text box, or into the Control Source on the Data Tab.
 

Attachments

  • Capture.PNG
    Capture.PNG
    37.6 KB · Views: 142
I had to change the bound column to "2" for whatever reason. When I would make the textbox = .Column(#) it would only show the first column and only when the # was a -1 (no other negative or positive numbers worked). Regardless, working now, thanks!
 

Users who are viewing this thread

Back
Top Bottom