I have a form which is a 3 levels of form... mainform, subform and sub subform.
cboCategory will be populated based on two combobox namely cboGender and cboGrade. I did this succesfully without any problem. All of this combobox are in the subform.
Now I have another combobox, cboEvent which is in sub subform. I want this cboEvent to be populated based on changes in the cboCategory (in the subform). However it works only at the first record. When I'm going to add or move to the next record, the category have no change no matter what is happening to cboCategory.
I hope someone will have time to look at my Db and please let me know what is wrong with it. Thank you so much.
You have to requery the combo cboEvent after updating the value of cboCategory:
Private Sub cboCategory_AfterUpdate()
Generally speaking, it would be a good idea to avoid spaces and other "special" characters when you name your objects (e.g. tblStudentEvent_SubForm instead of tblStudentEvent SubForm), as well as to give meaningful names to the controls (e.g. Cmd_AddStudent instead of Command33), this would spare you a lot of troubles when debugging or when you have to review the code, sometimes a long time after you wrote it.
Thank you very much for your reply and it's work. However is there any possibility or any way that I don't need to click cboCategory to make the cboEvent been requery?
It is because the cboCategory will be already populated based on the gender and student's grader. So there will be only one category shown in cboCategory, hence no need to click for cboCategory anymore.
About the naming in Access, thanks for your advice. For now I just follow the default name created by Access to avoid from being confused (I'm just a beginner).
Oooppss.... I got it. I put the above syntax in the cboGender and cboGrade after update event.
However there is one more problem. After fill in a few students' records, when I go to the previous students' records, I found the event information (in sub subform) gone missing. When I put in the event information for the student, the event information for the other students then gone missing. Can you tell me how to settle this problem?