Combo information (1 Viewer)

ClaraBarton

Registered User.
Local time
Today, 16:26
Joined
Oct 14, 2019
Messages
427
I have a subform that has a combo box with 5 columns of information to assist in picking the right record for one field. This information is drawn from a different query from the subform query.
I'd like for this (5 fields) information to remain in smaller un-enabled fields underneath the actual record or combo. Since this information is different from the actual form record, I'm having difficulty showing it. How would I go about this?

For instance a customer calls with an order that's similar to one that was previously built. The Combo shows previous similar items and which customer they are located under. The item and other customer details are the subform record. But the combo selection item is also a previous record that I need to show underneath in small print so I can locate it later.
Is this clear at all? Possible?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 07:26
Joined
May 7, 2009
Messages
19,169
add Labels(or textboxes) same number as the info you need to show.
add code to the Combo's AfterUpdate event:
Code:
private sub ComboName_AfterUpdate()
me!label1.Caption = Me!ComboName.Column(0)
me!label2.Caption = Me!ComboName.Column(1)
me!label3.Caption = Me!ComboName.Column(2)
me!label4.Caption = Me!ComboName.Column(3)
me!label5.Caption = Me!ComboName.Column(4)
end sub
 

ClaraBarton

Registered User.
Local time
Today, 16:26
Joined
Oct 14, 2019
Messages
427
Thank you so much. So simple!
 

ClaraBarton

Registered User.
Local time
Today, 16:26
Joined
Oct 14, 2019
Messages
427
This is a continuous form. The combo returns a customer id to to tie it to the main form and an item ID for the item.
I have different items in each row but all the above information is for the most recently selected (last item) field. why doesn't it stay the same as the record selected?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 07:26
Joined
May 7, 2009
Messages
19,169
last item? meaning last item in your continuous form?
 

ClaraBarton

Registered User.
Local time
Today, 16:26
Joined
Oct 14, 2019
Messages
427
last record selected. Each combo is a different row (record) but all the little info boxes return the same values as one of the records. Whichever one was just updated.
 

mike60smart

Registered User.
Local time
Today, 23:26
Joined
Aug 6, 2017
Messages
1,899
Hi Clara

Can you upload a zipped copy of the database?
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 19:26
Joined
May 21, 2018
Messages
8,463
last record selected. Each combo is a different row (record) but all the little info boxes return the same values as one of the records. Whichever one was just updated.
If this is a continuous form all unbound controls will have the same properties. You change label1.caption and every instance will change. There is no work around, except maybe using the paint event. However, that would probably give you pretty bad results. Better approach would be to add to the query (if this is possible) the additional fields related to the name selected.. Then you can show them in a textbox and make sure to make them uneditable (locked).
 

ClaraBarton

Registered User.
Local time
Today, 16:26
Joined
Oct 14, 2019
Messages
427
You hit it. That's exactly what's happening. Thank you for your time.
 

ClaraBarton

Registered User.
Local time
Today, 16:26
Joined
Oct 14, 2019
Messages
427
For what it's worth... I went a different route. I created a 2nd continuous subform with a combo that is not connected to the main form. Works great. Thank you all for the ideas.
 

Users who are viewing this thread

Top Bottom