How to populate a product name based on 3 combobox selections (1 Viewer)

chrisjames25

Registered User.
Local time
Today, 10:00
Joined
Dec 1, 2014
Messages
345
Hi

I have a form where i have 3 comboboxes, PotSize, Pot Shape, Pot Colour. These are independent of each and not linked in any way.

As i select each combobox i want it to populate a Final Pot Name in a text box below the comboboxes.

For example if i choose 2L (potsize) Round (pot shape) and Teraacotta(pot colour) i want the text box to state:

"2L-Round-Terracotta"

In each combobox the first column is the id number of the table not the describing field so can can i get it to populate the words rather than id numbers:

Currently have this code in afterupdate of each combobox:

Code:
      Me.Txt_NewTier2.Value = Me.Cbo_Tier1.Value & "-" & Me.Cbo_Tier2.Value & "-" & Me.Cbo_Tier3.Value

Problem is the answer i am getting is "2-2-17 rather than "2L-Round-Terracotta"

Any help much appreciated
 

Isaac

Lifelong Learner
Local time
Today, 02:00
Joined
Mar 14, 2017
Messages
2,693
You want to refer to the combobox's 2nd column .Columns(1) I believe is the syntax from memory, rather than the combobox value, which is returning the bound column's value.
 

chrisjames25

Registered User.
Local time
Today, 10:00
Joined
Dec 1, 2014
Messages
345
THnkas for this. Very useful article and that is what i am trying to do but i also want to create this 3 part name system because on another form i will use this name sytstem to select the pot that i want to plant my young plants into and it will stop me have to choose three comboboxes. I will just have to choose one. So i guess I want the form to create the composite unique index and create me a unique name for use on another form.
 

Users who are viewing this thread

Top Bottom