Continuous Form and ComboBox

B

Brad

Thanks for taking the time to read my question.

I have a continuous form that has a combo box on it. As the user selects
items from the combo box for each record, I'd like the list to shorten and
not include previously selected items.

can I do this?

I tried making the RowSource a query where the Criteria was not equal to the
values in the combo box, but then I get nothing.

SQL:
SELECT [tblChangeDefaults].[ItemsToChange] FROM tblChangeDefaults GROUP BY
[tblChangeDefaults].[ItemsToChange] HAVING
(((tblChangeDefaults.ItemsToChange)<>[Forms]![frmtblDataChange]![ValueToChange])) ORDER BY [tblChangeDefaults].[ItemsToChange];

Thanks,

Brad
 
B

Brad

Tried this too:

SELECT [tblChangeDefaults].[ItemsToChange] FROM tblChangeDefaults GROUP BY
[tblChangeDefaults].[ItemsToChange] HAVING
(((tblChangeDefaults.ItemsToChange) Not In (SELECT DISTINCTROW
tblChangeDefaults.ItemsToChange FROM tblChangeDefaults))) ORDER BY
[tblChangeDefaults].[ItemsToChange];
 
K

KARL DEWEY

Yer gonna need two tables to play with. One yer er getting from and the
other is the table of the field the combo is bound to.

Build your combo source query with the two tables left joined,
[tblChangeDefaults].[ItemsToChange] to bound field. Set criteria fer the
bound field as NULL.

--
KARL DEWEY
Build a little - Test a little


Brad said:
Tried this too:

SELECT [tblChangeDefaults].[ItemsToChange] FROM tblChangeDefaults GROUP BY
[tblChangeDefaults].[ItemsToChange] HAVING
(((tblChangeDefaults.ItemsToChange) Not In (SELECT DISTINCTROW
tblChangeDefaults.ItemsToChange FROM tblChangeDefaults))) ORDER BY
[tblChangeDefaults].[ItemsToChange];

Brad said:
Thanks for taking the time to read my question.

I have a continuous form that has a combo box on it. As the user selects
items from the combo box for each record, I'd like the list to shorten and
not include previously selected items.

can I do this?

I tried making the RowSource a query where the Criteria was not equal to the
values in the combo box, but then I get nothing.

SQL:
SELECT [tblChangeDefaults].[ItemsToChange] FROM tblChangeDefaults GROUP BY
[tblChangeDefaults].[ItemsToChange] HAVING
(((tblChangeDefaults.ItemsToChange)<>[Forms]![frmtblDataChange]![ValueToChange])) ORDER BY [tblChangeDefaults].[ItemsToChange];

Thanks,

Brad
 
B

Brad

Shoot!! I was hoping I wouldn't have to do that.

Oh well.

Thanks Karl.

Brad

KARL DEWEY said:
Yer gonna need two tables to play with. One yer er getting from and the
other is the table of the field the combo is bound to.

Build your combo source query with the two tables left joined,
[tblChangeDefaults].[ItemsToChange] to bound field. Set criteria fer the
bound field as NULL.

--
KARL DEWEY
Build a little - Test a little


Brad said:
Tried this too:

SELECT [tblChangeDefaults].[ItemsToChange] FROM tblChangeDefaults GROUP BY
[tblChangeDefaults].[ItemsToChange] HAVING
(((tblChangeDefaults.ItemsToChange) Not In (SELECT DISTINCTROW
tblChangeDefaults.ItemsToChange FROM tblChangeDefaults))) ORDER BY
[tblChangeDefaults].[ItemsToChange];

Brad said:
Thanks for taking the time to read my question.

I have a continuous form that has a combo box on it. As the user selects
items from the combo box for each record, I'd like the list to shorten and
not include previously selected items.

can I do this?

I tried making the RowSource a query where the Criteria was not equal to the
values in the combo box, but then I get nothing.

SQL:
SELECT [tblChangeDefaults].[ItemsToChange] FROM tblChangeDefaults GROUP BY
[tblChangeDefaults].[ItemsToChange] HAVING
(((tblChangeDefaults.ItemsToChange)<>[Forms]![frmtblDataChange]![ValueToChange])) ORDER BY [tblChangeDefaults].[ItemsToChange];

Thanks,

Brad
 
B

Brad

Hi Karl,

I put your suggestion in place and it's sort of working. The RowSource
query works, but after I update a record I requery the combobox but the
values don't update. Am I doing something else wrong?

Thanks,

Brad

KARL DEWEY said:
Yer gonna need two tables to play with. One yer er getting from and the
other is the table of the field the combo is bound to.

Build your combo source query with the two tables left joined,
[tblChangeDefaults].[ItemsToChange] to bound field. Set criteria fer the
bound field as NULL.

--
KARL DEWEY
Build a little - Test a little


Brad said:
Tried this too:

SELECT [tblChangeDefaults].[ItemsToChange] FROM tblChangeDefaults GROUP BY
[tblChangeDefaults].[ItemsToChange] HAVING
(((tblChangeDefaults.ItemsToChange) Not In (SELECT DISTINCTROW
tblChangeDefaults.ItemsToChange FROM tblChangeDefaults))) ORDER BY
[tblChangeDefaults].[ItemsToChange];

Brad said:
Thanks for taking the time to read my question.

I have a continuous form that has a combo box on it. As the user selects
items from the combo box for each record, I'd like the list to shorten and
not include previously selected items.

can I do this?

I tried making the RowSource a query where the Criteria was not equal to the
values in the combo box, but then I get nothing.

SQL:
SELECT [tblChangeDefaults].[ItemsToChange] FROM tblChangeDefaults GROUP BY
[tblChangeDefaults].[ItemsToChange] HAVING
(((tblChangeDefaults.ItemsToChange)<>[Forms]![frmtblDataChange]![ValueToChange])) ORDER BY [tblChangeDefaults].[ItemsToChange];

Thanks,

Brad
 
B

Brad

Hi Karl,

I just figured it out. The problem was I was requerying (is that how you
spell that????) the combobox on the AfterUpdate event. In the Continuous
Form view, the ComboBox on the Uncreated Next Record (New Record) gets
created before the AfterUpdate event on the Current record fires. SO to fix
it, I did a requery on the GotFocus event and it all works perfectly.

Hope that makes sense.

Brad

KARL DEWEY said:
Do you mean that the list still has the item that was picked in the list?

Post the RowSource query SQL.

--
KARL DEWEY
Build a little - Test a little


Brad said:
Hi Karl,

I put your suggestion in place and it's sort of working. The RowSource
query works, but after I update a record I requery the combobox but the
values don't update. Am I doing something else wrong?

Thanks,

Brad

KARL DEWEY said:
Yer gonna need two tables to play with. One yer er getting from and the
other is the table of the field the combo is bound to.

Build your combo source query with the two tables left joined,
[tblChangeDefaults].[ItemsToChange] to bound field. Set criteria fer the
bound field as NULL.

--
KARL DEWEY
Build a little - Test a little


:

Tried this too:

SELECT [tblChangeDefaults].[ItemsToChange] FROM tblChangeDefaults GROUP BY
[tblChangeDefaults].[ItemsToChange] HAVING
(((tblChangeDefaults.ItemsToChange) Not In (SELECT DISTINCTROW
tblChangeDefaults.ItemsToChange FROM tblChangeDefaults))) ORDER BY
[tblChangeDefaults].[ItemsToChange];

:

Thanks for taking the time to read my question.

I have a continuous form that has a combo box on it. As the user selects
items from the combo box for each record, I'd like the list to shorten and
not include previously selected items.

can I do this?

I tried making the RowSource a query where the Criteria was not equal to the
values in the combo box, but then I get nothing.

SQL:
SELECT [tblChangeDefaults].[ItemsToChange] FROM tblChangeDefaults GROUP BY
[tblChangeDefaults].[ItemsToChange] HAVING
(((tblChangeDefaults.ItemsToChange)<>[Forms]![frmtblDataChange]![ValueToChange])) ORDER BY [tblChangeDefaults].[ItemsToChange];

Thanks,

Brad
 
Top