Something strange is going on here, I don't remember ever
seeing that error message before. I thought you were
paraphrasing the usual parameter prompt message.
Let's at least we have our nomenclature correct. I can't
tell if your use of the word "field" is precise enough. A
"field" is a column in a table or query. A "Control" is an
object (text box, combo box, etc) on a form or report. When
you say the field numID is causing a problem (in the query's
WHERE clause?) I can't tell if you mean the field in the
TblCurrentStaff table or the combo box on the form or
something else.
Wait a minute, hold on to everything. I just noticed that
the part of the WHERE clause:
TblCurrentStaff.numID=Forms!FrmContact2!Staff!numID
the reference to the combo box Forms!FrmContact2!Staff!numID
is garbled. If the name of the combo box is Staff, then the
!numID is incorrect and should be removed. Try this
instead:
TblCurrentStaff.numID=Forms!FrmContact2!Staff
Depending on the combo box's BoundColumn property (which
should correspond to the numID field in the table), the
value of the combo box is directly available without extra
qualifications.
Double check the Staff combo box properties ColumnCount,
BoundColumn and ColumnWidths to make sure they agree with
the RowSource: if the ColumnCount is off, nothing about the
combo box will work as expected; if the BoundColumn is not
set properly, the query will not compare to the right value;
and if the ColumnWidths are out of whack, you won't see the
list's data or the box will display the wrong column.
--
Marsh
MVP [MS Access]
Okay, I think I've narrowed it down. It has something to do with the field
numID. I completely rebuilt the query, adding in each field individually and
then creating the combo after I entered a field. I had no problem until I
came to the numID field. At that point, the message "No value given for one
of more required parameters" came up. I'm not sure why though...Any ideas????
:
Well, I tried entering the rowsource without the wizard and still no luck.
Any ideas?? I'm just stumped!
Thanks!
:
Yes, it's the correct query. There really isn't a prompt, just the message I
initially mentioned. I still haven't tried it without the wizard though.
I'll try that in a little bit and post again if it worked.
:
Are you sure that query is used as the RowSource property of
the 2nd combo box?
If it is, the fact that you are being prompted for something
means that that something in the reference is not
resolvable. Perhaps it's as simple as a slight spelling
mistake or the name of the first combo box is not what you
thought it was. Double check the parameter prompt string
when it pops up, it tells you what it can't resolve.
--
Marsh
MVP [MS Access]
Tara wrote:
Everything is set up right as far as the underlying query and AfterUpdate
event, I'm sure. If I manually run the underlying query and enter the
StaffID (numId) when it prompts me to, the query works fine. The only
problem seems to setting up the second combo. I have only tried it with the
wizard though, so maybe I'll try to set it up without the wizard to see what
happens. It shouldn't make a difference though, right?
Here's the SQL view of the query for the second combo (which uses 3 tables
instead of 2 like I said before):
SELECT TblClientCaseInfo.ClientCaseInfoID, [ClientLast] & ", " &
[ClientFirst] AS ClientName, TblClientCaseInfo.Program, TblCurrentStaff.numID
FROM TblClientContactInfo INNER JOIN (TblClientCaseInfo INNER JOIN
TblCurrentStaff ON TblClientCaseInfo.numID = TblCurrentStaff.numID) ON
TblClientContactInfo.numIDNum = TblClientCaseInfo.numIDNum
WHERE (((TblCurrentStaff.numID)=[Forms]![FrmContact2]![Staff]![numID]) AND
((TblClientCaseInfo.CloseDate) Is Null))
ORDER BY [ClientLast] & ", " & [ClientFirst];
:
Tara wrote:
I have a combo that I'm trying to limit based on the value selected in
another combo. In the 1st combo, the user will select a staff members name
(with StaffID as the bound column). I want the 2nd combo to then populate
with only those clients associated with the staff member. The second combo
is based on a query that pulls information from 2 different tables. One
table holds client contact information (Name, Address, Etc.) and the 2nd
table holds client case information, which also includes StaffID. When I
start to put the 2nd combo together, I get the error message "No value given
for one or more required parameters".
The clients combo box's RowSource query need to use the
staff combo box as the criteria for the staff field in the
query. The criteria will liik like:
Forms![name of form].[name of 1st combo]
You may or may not have other issues in the query, but I
can't check that until you post a Copy of it.
Don't forget that the 1st combo box's AfterUpdate event
provedure needs to Requery the 2nd combo box.