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

A List Box with Only Part of he Data being Selected

Status
Not open for further replies.

quest4

Technical User
Aug 27, 2001
735
US
Hi, folks. I have a little problem in which way to go with this. I have two tables, tblDestinations, which has two fields, Destination and JobNotes, in it. I have a second table tblPartMaster, which has three fields in it, Part No, Destination and JobNotes. When I enter a new PartNo, I want to be able to tab ovet to Destination, which s a List Box, and pull down and select one of the Destination choices. I also want it to automatically enter JobNotes, from the JobNotes in the tblDestinations, which is in the same row as the selected Destination. I have tried SELECT and SELECT DISTINCTROW, but nothing seems to be bringing in the second field of the row. Any suggestions? Thanks a lt in advance.
 
quest,
Are the "column count" and "column width" set correctly?
If your column count is 2 the column width needs two entries.
1.3";1.3"
If there are 3 columns then you need three entries in the column width.
1.3";1.4";1.5"
Jim
 
Thanks for the reply. I changed Column Count to 2, on both fields, and I changed the Column Width to 1.3";1.3", on both field and I set the Bound Column to 1 for both fields. I get the first field, but not the second field. I can select, from a pull-down both columns. I still have the SELECT DISTINCTROW in Row Source, if that matters. Any other suggestions? Thanks again for thew help.
 
If you do not want the first col, set it's width to zero:
0;1.3;1.3
 
Thanks for the reply. I want to see both columns, at the same time, while selecting only the first column, which is Destination. That is the problem, I can select each individually, but I can't seem to select the the entire row, from tblDestinations, which has two field in it. I figure I must be doing something wrong be Ican't quite see what yet. Any suggestions will be deeply appreciated. thanks again foryour assistance.
 
Hi quest!

Have you tried using the column property of the list box?

Use the code:

Me.{name_of_listbox}.column(1)

which should give the value on the second column (listboxes are zero based)

You can then assign the value to a hidden bound textbox or fire it through SQL.

GL!

 
Thanks for the reply. But it still is not working completely, but almost. I changed the List Box in the second table to be a double List Box, and that appears to be working. I run this through a simple select query, so I can be asked to enter the part number. In the form, I can get the first column of Destination to display, but I can not get the second column to display in the form. Any suggestions? I have tried using Destination.Column1 in several location and ways, but to no avail. Thanks again.
 
I figured out what was wrong with the last tip, a bug in the form. When I made a new form, all of the problems went a way. thanks for all of your assistance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top