Combo box storing wrong field

B

Broadbonian

Access 2003
Not sure if using right approach. 3 tables:Job, Employee, Equipment, Trucks.
I have a form-Schedule that uses the table Job. The user chooses a job, a
date range, the uses combo boxes to choose Employee, Equipment, Trucks. They
can choose up to 9 rows per combo box. Then I want to use an append qry to
create the "schedule" for that time period. The user needs to be able to go
back in the form and change the schedule if necessary. Am I on the right
track? I can get the combo boxes to display all their fields, but when I
choose it only stores the 1st column, even though the bound column is #3.
The control is bound to a field in the Job table. What am I doing wrong? Is
this the correct approach to this database?
Thanks for any help
Darc
 
K

KARL DEWEY

but when I choose it only stores the 1st column, even though the bound
column is #3.
Open form in design view, click on the combo and look at the property Column
Widths. This property sets the display widths in inches. If it shows 0";
0"; 1.5" or some such it will not display columns 1 and 2. Normally you only
want to display one column.
 
B

Broadbonian

Hi Karl, Thanks for the help. I got a little further. I do want to display
all 3 columns in my form, which it does, until click on the row I want. Then
it only displays the first column. I want it to display the second column
info. It does store the second column info when I do the make table query,
so that works now. Can you help with the display?
 
B

Broadbonian

I do want them all to display until I click on them, then only want column
two to show while the user is choosing other pieces of equipment in the 7
other combo boxes. Another issue, when they are done filling in form, a macro
run the make table qry on all combo boxes, how do I have it run only on the
combo boxes that have been clicked? Otherwise I get rows of data with only
the dates in them.
 
K

KARL DEWEY

I do want them all to display until I click on them, then only want column
two to show while the user is choosing other pieces of equipment in the 7
other combo boxes.
You did not state whether what I posted work for you or not.
You will need to post again as I have not worked with multi-select combos.
 
B

Broadbonian

No-When I put in your column widths, I only see the second column in the drop
down list. I need to see all three columns, then when I choose, only see the
second displayed. Is that possible?
 
K

KARL DEWEY

Ok, I told you some wrong information.
First, a combo box does not store information, the field it is bound to
stores the information.
Second, you said 'I can get the combo boxes to display all their fields, but
when I choose it only stores the 1st column, even though the bound column is
#3.' It is displaying the first column. It will only display one.

Combine your fields 1 and 2 like this -- SELECT [Field1] & " " & [Field2],
[Field3] FROM.....

Set column count to 2.

For the pull-down you need to set the column widths to see each one and the
List Width so that all are visible in the list without needing to scroll to
the right.
 
B

Broadbonian

Ok, I will use the concatenation. The combo boxes are not bound. When I used
the wizard to create, I chose "store data for later use", in the make table
qry. When they are bound , all 9 show the same piece of equipment as the
first combo box. Guess this is the only way to do this?
Thanks for your help--
Darc


KARL DEWEY said:
Ok, I told you some wrong information.
First, a combo box does not store information, the field it is bound to
stores the information.
Second, you said 'I can get the combo boxes to display all their fields, but
when I choose it only stores the 1st column, even though the bound column is
#3.' It is displaying the first column. It will only display one.

Combine your fields 1 and 2 like this -- SELECT [Field1] & " " & [Field2],
[Field3] FROM.....

Set column count to 2.

For the pull-down you need to set the column widths to see each one and the
List Width so that all are visible in the list without needing to scroll to
the right.
--
KARL DEWEY
Build a little - Test a little


Broadbonian said:
No-When I put in your column widths, I only see the second column in the drop
down list. I need to see all three columns, then when I choose, only see the
second displayed. Is that possible?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top