![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a form with a subform. The subform contains a bound combo box, from which the user can select a parent. The subform also displays some other data relating to the parent in a number of unbound controls. These get updated when the user makes a selection from the combo box. If the parent does not appear in the list, the users clicks on the 'Add New Parent' button, which opens another form. Here the user can add a parent, go back to the other form/subform, where the new parent now appears in the combo. All of this works fine. However, if the user wants to edit the parent data, I run into problems. The user opens the same form as they did to add a parent, which now displays the data relating to the parent they want to edit. They edit, close and save the record successfully. When the user goes back to the form/subform, I can requery the combo box on the subform with: Forms!MainForm!SubForm!combobox.requery How do I requery the contents of the unbound controls on the subform to show the edited data? I understand that the requery method will not work with unbound controls. I've tried .reclac, .refresh, .repaint with no success. TIA |
#3
| |||
| |||
|
|
Presumably you're using the AfterUpdate event of the combo to update the unbound controls. So to update them when you requery it, call it's AfterUpdate as well. |
#4
| |||
| |||
|
| Presumably you're using the AfterUpdate event of the combo to update the unbound controls. So to update them when you requery it, call it's AfterUpdate as well. Hello, Thanks for the reply. I am using the following with no success: Call Forms.frmPerson.frmMotherSub.Form.cmbMother_AfterU pdate |
#5
| |||
| |||
|
|
On 03/10/2011 11:51:04, Mo wrote: Presumably you're using the AfterUpdate event of the combo to update the unbound controls. So to update them when you requery it, call it's AfterUpdate as well. Hello, Thanks for the reply. I am using the following with no success: Call Forms.frmPerson.frmMotherSub.Form.cmbMother_AfterU pdate Excuse me asking, but why are'nt the subform's controls bound? Phil |
#6
| |||
| |||
|
|
Excuse me asking, but why are'nt the subform's controls bound? Phil |
#7
| |||
| |||
|
|
On 03/10/2011 12:18, Phil wrote: On 03/10/2011 11:51:04, Mo wrote: Presumably you're using the AfterUpdate event of the combo to update the unbound controls. So to update them when you requery it, call it's AfterUpdate as well. Hello, Thanks for the reply. I am using the following with no success: Call Forms.frmPerson.frmMotherSub.Form.cmbMother_AfterU pdate Excuse me asking, but why are'nt the subform's controls bound? Phil It doesn't appear to make any difference. I'm not able to get the controls on 'frmMotherSub' to show updated data when I close the form to edit parents' details. |
![]() |
| Thread Tools | |
| Display Modes | |
| |