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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking Fields

Status
Not open for further replies.

dhirajm

IS-IT--Management
Sep 26, 2001
7
AE
I have worked on designing access for Proforma invoice.I am facing a problem. the table field carrie Product ID / Product and Part number.
The form carries ProductID Product Name. i am stuck atone place when i select teh product from the combobox i want teh part number corresponding to it also to come in that box . is it possible? help me out
 
In the properties of the combo box set teh row source to a query or SQL statement that presents teh information you want in the combo box. Then make sure you set the column count, Column widths and list widths properties to correspond to the number of columns to present.

If number column Count = 3 then
Column Widiths might be something like
1";1";.5" giving you three columns with widths of 1 inch, 1 inch, and 1/2 inch or maybe something like this
0";2";1" giveing three columns of 0 inches (hidding the column), 2 inches and 1 inch

If you do set the widths of the columns and do not use the defaults you must also set the list width property = to the total of the column widths.

Good luck
ssecca
 
SSecca
I kept at 0" 2"and 1"now i can see the 2 fields products and part number while entering in the form. when i click the combobox i see the list but the moment i click to select i get only the product name . the part number dissapears.
 
Hi DH,

In the combo 'Row Source' property, select all fields that you wish to view in the combo, eg "Select [Product ID], [Product] from tblProduct"

Set the combo 'Column Count' property to 2 (you have 2 fields in the combo).

Set the combo 'Column Widths Property' to "3cm;3cm" to actually show both fields (adjust these sizes for the lengths of each of these fields).
If you didn't wish to see the ProductID then you'd set this to "0cm;3cm".

Hope this helps.

Regards,

Darrylle "Never argue with an idiot, he'll bring you down to his level - then beat you with experience."
 
darrrylles
i kept the product ID / Product and part number. and kept teh first as 0".
i can see in the list but the moment i clcik to select only product name comes and part number dissapears
 
Hiya,

Sorry ssecca got in first (whilst I was still typing mine), that's why you see duplication.

Regards,

Darrylle "Never argue with an idiot, he'll bring you down to his level - then beat you with experience."
 
ssecca/darrylle
i tried ssecca but now the me.txtbox.value gave me macro error.
 
Thats correct a combo box only displays the column you tell it to. In order to view oter info a little different set up is required. So the question is do you NEED to see the other info or do you mearly want to use the other info to drive more choices.

Also, don't be using macros, VBA is much more powerful and dynamic.

Good luck
ssecca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top