Combo box help....

J

J Sines

I work at a school and Im collecting data on different
students. On my main form, I have basic information on
the student (grade, teacher, etc.). In a seprate table, I
have all of the teacher's names and their grade. Ive got
a querry set up where it will look at the grade box on my
main form, and using a combo box, list only the teachers
in that grade to select from. Im trying to keep from
manually typing out teacher's names on the form.

Anyway, I cannot get the combo box to work. When I enter
in a new student,I have yet entered in the grade, so it
shows nothing in the teacher box. It will not update
after entering in the grade. What can I do?
Jason
 
T

tina

did you set a macro or event procedure, in the AfterUpdate
event of the Grade control, to requery the Teacher combo
box control?
if no, doing that should take care of it.
if yes, can you post your code? also, suggest you
doublecheck the control reference in the combo box's query
criteria.
 
J

Jason S

No, I didnt have the grade control set to requery. That
would make sense, thanks. I did now do it and it is
still not working. Im wondering if I have something wrong
in the query now. I have the grade criteria set as
[Forms]![Main]![Grade]

Im wondering now, this grade control box is in a subform
on the Main form. I tried switching it to
[Forms]![Referral Tracking]![Grade]
Which is the name of the form, but that didnt work either.

Now, when I update the grade box, it the querry asks me
for the grade instead of looking it up. I just must not
be tapping into that subform.
Jason
 
T

tina

if the Grade control is in a subform, then in the query
that uses that control's value as a criteria, the
reference should be as follows:

Forms!MainFormName!SubFormName!GradeControlName

i won't be coming back to this thread, so if that doesn't
work and nobody else helps you get it fixed, you're
welcome to email me. :)

-----Original Message-----


No, I didnt have the grade control set to requery. That
would make sense, thanks. I did now do it and it is
still not working. Im wondering if I have something wrong
in the query now. I have the grade criteria set as
[Forms]![Main]![Grade]

Im wondering now, this grade control box is in a subform
on the Main form. I tried switching it to
[Forms]![Referral Tracking]![Grade]
Which is the name of the form, but that didnt work either.

Now, when I update the grade box, it the querry asks me
for the grade instead of looking it up. I just must not
be tapping into that subform.
Jason


-----Original Message-----
did you set a macro or event procedure, in the AfterUpdate
event of the Grade control, to requery the Teacher combo
box control?
if no, doing that should take care of it.
if yes, can you post your code? also, suggest you
doublecheck the control reference in the combo box's query table,
I
.
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top