abbreviated list from one client number...
-----Original Message-----
You're right, I was referencing the second column of
cboCltName. However when I altered the query to reflect
this (qryWorkerLookup) it still didn't work. Here is the
SQL so far:
SELECT qryWorkerLookup.TempName, qryWorkerLookup.TempNo
FROM qryWorkerLookup
WHERE (((qryWorkerLookup.CltNumber)=[Forms]!
[frmSubStatic]!
[frmSubDynamic].[Form]![cboCltName]));
Both cboCltName and cboTempName are referencing the
second
column (to save a numerical value in the underlying
table), but all fields are available to the query. Is
there any further info I can post, because so far it's
still blanking me...
-----Original Message-----
Aaron,
Judging by the name you have used in referring to the
combo box, it appears
that the combo box is on the subform. If so, the syntax
does NOT include the
name of the subform. The subform is actually held in a
control on the main
form called a subform control. You need to refer to this
control instead. It
may or may not have the same name as the subform,
depending on whether you
changed it or on how you added the subform to the main
form. Also, since you
are referring to a combo box, how many columns are in
the
combo box that you
are referring to? If there is more than one, be aware
that you are referring
to the Value property and that will come from the Bound
column, which is not
necessarily the column that is displayed in the textbox
portion of the combo
box. If that is the problem, you can either change which
field you are
filtering on or use the Column property of the combo box
to get the value
from the desired column.
To get the name of the subform control, open the main
form in design mode
and open the Properties sheet. Click on the subform ONE
time. The properties
sheet should show the name of the subform control. If
you
click more than
once, you'll be in the subform and the properties sheet
will show the name
of the subform or its controls. Once you have the name
of
the subform
control, the syntax would be:
[Forms]![NameOfMainForm]![NameOfSubformControl]. [Form]!
[cboCltName]
I tried referring to a particular column in the SQL, but
I don't know if I
wasn't getting the bracketing correct or is SQL just
doesn't like specifying
a property of the combo box. But I couldn't get it to
work. So, if the Value
of the combo box isn't the Client Name, you'll need to
filter on the field
correlates to the bound column.
--
Wayne Morgan
MS Access MVP
in message
Yes that would have helped wouldn't it
SELECT qryWorkerLookup.TempName, qryWorkerLookup.TempNo
FROM qryWorkerLookup
WHERE (((qryWorkerLookup.CltName)=[Forms]!
[frmSubStatic]!
[cboCltName]));
Hope this makes sense.
.
.