R
Richard
Hi
I have a form "frmNotice"
& a subform "YoungPersonSubform"
with a combo box to update the record displayed in the subform
The two forms are linked on the field IDPerson
The challenge I have is Refreshing or Requerying the subform with the error
2465
"can't find the field YoungPersonSubform"
the code for the combo box is:
Private Sub Combo60_AfterUpdate()
' Find the record that matches the control.
Forms!frmNotice.IDPerson = Combo60 'updating the mainform - works
Forms!frmNotice!YoungPersonSubform.Form.Requery '2465 error cant find
field..
Forms![YoungPersonSubform].Requery '2450 cant finnd the form ...
Forms!frmnotice![YoungPersonSubform].Requery '2465 cant find field ...
Forms!frmnotice.form![YoungPersonSubform].Requery '2465 cant find field ...
Forms!frmnotice.Form![YoungPersonSubform].Form.Requery '2465 " " "
I have also tried:
DoCmd.GoToRecord acDataForm, "youngpersonsubform", acGoTo, IDPerson = Combo60
With error 2489 The object 'YoungPersonSubform' isn't open!
Office 2003 being used, I can see the subform open within a tab on the
parent form, so why am I having these problems?
I have listed just some of the variations I have tried to refresh the
subform, others have been tried with similar effect with & without brackets
for the formname.
The subform will update if I move to another record & return to the first!!
I have also tried the refresh line of code in the onCurrent event on the
mainForm with no results.
Would be most grateful for some assisatance - Thanks
I have a form "frmNotice"
& a subform "YoungPersonSubform"
with a combo box to update the record displayed in the subform
The two forms are linked on the field IDPerson
The challenge I have is Refreshing or Requerying the subform with the error
2465
"can't find the field YoungPersonSubform"
the code for the combo box is:
Private Sub Combo60_AfterUpdate()
' Find the record that matches the control.
Forms!frmNotice.IDPerson = Combo60 'updating the mainform - works
Forms!frmNotice!YoungPersonSubform.Form.Requery '2465 error cant find
field..
Forms![YoungPersonSubform].Requery '2450 cant finnd the form ...
Forms!frmnotice![YoungPersonSubform].Requery '2465 cant find field ...
Forms!frmnotice.form![YoungPersonSubform].Requery '2465 cant find field ...
Forms!frmnotice.Form![YoungPersonSubform].Form.Requery '2465 " " "
I have also tried:
DoCmd.GoToRecord acDataForm, "youngpersonsubform", acGoTo, IDPerson = Combo60
With error 2489 The object 'YoungPersonSubform' isn't open!
Office 2003 being used, I can see the subform open within a tab on the
parent form, so why am I having these problems?
I have listed just some of the variations I have tried to refresh the
subform, others have been tried with similar effect with & without brackets
for the formname.
The subform will update if I move to another record & return to the first!!
I have also tried the refresh line of code in the onCurrent event on the
mainForm with no results.
Would be most grateful for some assisatance - Thanks