Another combo question here

C

cjnow

im doing 2 combo box, one is depeng on another.
y it ask me to enter parameter after i select the choice in combo box1
 
J

JohnFol

Does the 2nd Combo get it's data from a query? If so, look at the query as
it has a field it can't work out (possibly the reference to the first
combo?)

For example


Select * from MyTable where MyField = Forms!MyForm!Combo1

If the control name is actually Combo2, you will get the "Enter Parameter".
 
I

ivalum21

JohnFol -

I have a very similar problem. I have a form named
frmAssignStudentsToClass, and a subform named sfrmAssignStudentsToClass.
Inside my sub form I have 2 combo boxes, cboClass and cboDay. When cboClass
is selected, I want cboDay to display only the days that a class is offered
on. Here is the SQL statement I have for cboDay...

SELECT Sessions.SessionID, Sessions.Day, Sessions.ClassID FROM Sessions
WHERE
(((Sessions.ClassID)=Forms!frmAssignStudentsToClass!sfrmAssignStudentsToClass.Form!cboClass)) ORDER BY Sessions.Day;

I get an input box asking me for
"Forms!frmAssignStudentsToClass!sfrmAssignStudentsToClass.Form!cboClass". I
don't know what I'm doing wrong, any suggestions??



JohnFol said:
Does the 2nd Combo get it's data from a query? If so, look at the query as
it has a field it can't work out (possibly the reference to the first
combo?)

For example


Select * from MyTable where MyField = Forms!MyForm!Combo1

If the control name is actually Combo2, you will get the "Enter Parameter".
 
Top