The requery method not work After updating the main form combo

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a main form and a subform. The combo box naming partno and Process in
the main form. The RejectCode Combo box in the sub form. The RejectCode
combo's row source property set to change with the contents of the the PartNo
and Process combo boxes in the main form.This works fine but when we going to
update the contens of the combos in the main form (PartNo and Process) the
combo (RejectCode) in the sub forms is not update.I have tried the event
AfterUpdate for the combo boxes in the Main form to requery the RejectCode
combo in the sub form. But Access give a msg that it can not find the sub
form.

I Use Requery method in the mainform in following way.(In After Update Events)

forms![JobLinesubform]![RejCode].Requery



Pls Help me someone on this.
Thanks
 
DBA said:
I have a main form and a subform. The combo box naming partno and Process in
the main form. The RejectCode Combo box in the sub form. The RejectCode
combo's row source property set to change with the contents of the the PartNo
and Process combo boxes in the main form.This works fine but when we going to
update the contens of the combos in the main form (PartNo and Process) the
combo (RejectCode) in the sub forms is not update.I have tried the event
AfterUpdate for the combo boxes in the Main form to requery the RejectCode
combo in the sub form. But Access give a msg that it can not find the sub
form.

I Use Requery method in the mainform in following way.(In After Update Events)

forms![JobLinesubform]![RejCode].Requery


A subform is not in the Forms collection of open forms. Try
this:
Me.JobLinesubform.Form.RejCode.Requery

Also, make sure that JobLinesubform is the name of the
subform **control** on the main form, which may be different
from the name of the form object it is displaying.
 
Back
Top