Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Synchronizing Combo and Text Box

Status
Not open for further replies.

Diezz

Technical User
Dec 24, 2004
61
NL
Hello,

My form contains 2 combo box, they are already synchronised, so for every ProductCategory i choose in the first combo box, i see only the products i should in the second.

However, i would like to have a description in the left of both combo box: a text box(if anyone have other ideeas i'm open to them), the first would describe the product category i choose in the cboProductCategory, the second will describe the product that i select in the second combo cboProductSelection.

Can i somehow synchronise the first combo with the first textbox, and the second cbo with the second textbox in the same form (in this case i'm not using subforms)?

I don't think this has to much impact on the situation but i give it as a info. I also have a checkbox in the right of every combo box witch makes the textbox visible or not, depending if i'm interested or not on the description.

Thanks and sorry for my bad english.
 
Let us say that each combo has the following columns:
ID, Product, Description

You can set each textbox as follows:
=cboCombo1.Column(2)

Column numbering starts at zero.
 
Hello Remou,

Thanks for your answer, however it seems not to work. Also i don't understand very well the part where a combo has more columns, it's all about the column count?
My first table is actually [Code Probleme] [Probleme] [Details]. In my combo i have the [Probleme] values. So for every [Probleme] value i choose, i want to receive it`s details in the textbox i build on its right.

I ve tried with =cboProbleme.column(3), however when i chose my value from the combo nothing appears in the text box.

Have i misunderstood or did something wrong?

Thanks
 
Sorry for my double post. In the same form i have 2 combo box and 2 text box, so i can build a combo with wizard to automaticaly update the values in the form, i want all 4 controls in the same form.
 
What I am suggesting is that you have three columns in your combo box:
[tt]Code Probleme, Probleme, Details[/tt]
You can do this with the wizard, simply choose the extra column when you are building the combo and then set the column widths in the property sheet so that it is not shown to the user. If you have this set up, you can then refer to the columns by number, starting at zero. Even with your current set-up you can test this by putting:
[tt]=cboProbleme.column(0)[/tt]
In a textbox, not what you want, but it will show you how it works.

It is also possible to use DlookUp, but you should include the Code Probleme column in your combo box set-up as the bound column, so I think it may be as well to just include all three columns and reference the columns by number.

Your combobox set-up would probably look like this:
[tt]
RowSourceType : Table/Query
RowSource : SELECT [Code Probleme],[Probleme],[Details] FROM tblTable;
ColumnCount : 3
ColumnWidths : 0;2.5;0
BoundColumn : 1[/tt]
 
It worked, this is great.

Thank you very much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top