Thanks for the help.
I tested what you said. The column count was 1, so i changed it to 3, but
then all 3 field names came up. I was actually trying to get it so that when
the combo box option is selected, the corrosponding fileld names would go to
their respective places on the form. It works for the first one.(brief
description) (comumn 1) but not for Name of violation( column 2), if i call
both column (1) then it works in both fields but with the wrong information
in the second field (is the same information becuase they are both column 1
information. So somehow column 1 option works on both fields, but not column
2. how it is now , it just wipes out what was in there and places nothing in
its place. Im thinking now, that since its doing that, perhaps its placing a
NULL value in there, but Im not sure how to check and fix it.
if you could help i would appreciate it.
thanks in advance
titan
Sprinks said:
Titan,
The first thing I would check is that [Sections], [Brief Description], and
[Name of Violation] are all valid field names in Violations and that you've
spelled them as they're defined.
I would also check to see if the particular record you tested the combo box
on has a non-null Name of Violation field. It could be your code is
assigning the value properly but that it has no value.
Secondly, ensure that the combo box' Column Count property is set to 3,
otherwise, the last column won't be included even though it's in your
RowSource field list.
Lastly, you do not need code to display other columns of a combo box.
Simply set the textbox' ControlSource property to:
=YourComboBox.Column(index)
Hope that helps.
Sprinks
:
Here it is
SELECT Violations.Sections, Violations.[Brief Description], Violations.[Name
of Violation] FROM Violations;
thanks for the help
titan
:
Titan,
Please post the Row Source of your combo box.
Sprinks
:
Hello,
Here is the situation. I need to fill in two fields in a form after a combo
box choice is selected. I pulled in the 3 fields in the query that the combo
box is based on. The Combo box list, the Next field, and the one after that.
Next, I wrote the code that was given to me by stating that "The next field"
= Information.Column(1). and it works
"The one after that" = Information.Column(2) and it does not work
if I change it to column(1) for "The one after that" it works. so for some
reason I can't pull up Column(2) data from the combo box.
Please help if you can
thank you in advance
titan