Re: Requery Combo Box
- From: "Chuck" <chuck@xxxxxxxxx>
- Date: Mon, 11 Jun 2007 19:57:33 -0400
Thanks Ken, I tried that and the results were an empty box.
The SQL was generated like you said, but produced no results.
"Ken Sheridan" <KenSheridan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:447E7B26-4E54-4749-93BE-7FE3DF1ABEE6@xxxxxxxxxxxxxxxx
You'll need to repeat the column name in the criterion for the second
combo
box:
<>Forms!frmApprovalList!ComboBox1 AND [Designator]
<>Forms!frmApprovalList!ComboBox2
You can do it in SQL view or all in one column as a single entry in the
criteria row in query design view, or you can add the Designator column to
the design grid twice, unchecking the 'show' check box for the second
instance. On the same criteria row for each column add the restrictions
separately in each, i.e. <>Forms!frmApprovalList!ComboBox1 for one and
<>Forms!frmApprovalList!ComboBox2 for the other. Access will then insert
the
AND operator in the SQL statement for you.
Ken Sheridan
Stafford, England
"Chuck" wrote:
Not sure if I am doing this correctly or not. I have a form that has
several combo boxes on it that allow a user to pick a name from a list.
I
need to have the next combo box be requeried and not include the
selection
from the first box. This has to continue until four boxes have been
selected.
The table, tblDesignators, have the data that is in the combo box. For
an
example, it contains the names of people.
The user selects a name from the first combo box that has a query behind
it
to select all the names. After the selection, the user moves onto the
next
box and selects a new name. I don't want the name from the first
selection
to appear in the box. I almost had it by using a query that had
something
like this in the criteria of the query:
<>Forms!frmApprovalList!ComboBox1.
This did work for the second combo box.
The third combo box I tried the criteria as
<>Forms!frmApprovalList!ComboBox1 AND <>Forms!frmApprovalList!ComboBox2.
The selection ended up with no records. I tried an OR as well and still
no
results.
If someone decides to go back and change names, the first box has to be
requeried and start again.
Make sense?
.
- Follow-Ups:
- Re: Requery Combo Box
- From: Ken Sheridan
- Re: Requery Combo Box
- References:
- Requery Combo Box
- From: Chuck
- Requery Combo Box
- Prev by Date: Re: combo boxex/listboxex
- Next by Date: Re: Query Too Complicated
- Previous by thread: Requery Combo Box
- Next by thread: Re: Requery Combo Box
- Index(es):
Relevant Pages
|