XelaIrodavlas
Registered User.
- Local time
- Today, 21:38
- Joined
- Oct 26, 2012
- Messages
- 175
Hi All,
I have a form [FrmPersonnel] which contains a subform [sFrmQuals] showing personnel qualifications.
I also have a third form [QualPopup] which is used to add the qualifications, rather than using the subform itself (I do this because the subform only shows a brief summary, rather than the 40-odd fields).
So QualPopup has an onClose event setup so when the user is done, the subform in the FrmPersonnel will be requeried, and data is displayed with the latest changes. The code looks like this:
This works perfectly fine if I go in and change a qualification, or add a second/third, or delete. But for some reason I just can't explain, the requery never seems to work for the first qualification!
For example:
If I enter a new starter onto FrmPersonnel, that's fine. If I then want to add a qualification I click the Cmd Button to open QualPopup, enter the qualification details, and close the Popup... I get no errors and return to the main form... I wait... but nothing shows on sFrmQuals. I then hit f5 on my keyboard and the record appears!
Having hit refresh manually, I can now hit the button again, add a second qualification or edit the first, and the changes show as soon as I close the Popup form.
So the code clearly works, just not for the first qualification. This is utterly baffling, does anyone have a clue why this is happening, or what I can do about it?
Many thanks as always
Alex S
I have a form [FrmPersonnel] which contains a subform [sFrmQuals] showing personnel qualifications.
I also have a third form [QualPopup] which is used to add the qualifications, rather than using the subform itself (I do this because the subform only shows a brief summary, rather than the 40-odd fields).
So QualPopup has an onClose event setup so when the user is done, the subform in the FrmPersonnel will be requeried, and data is displayed with the latest changes. The code looks like this:
Code:
If Me.Dirty Then Me.Dirty = False 'Save Record
Forms!FrmPersonnel!sFrmQuals.Requery
Exit Sub
This works perfectly fine if I go in and change a qualification, or add a second/third, or delete. But for some reason I just can't explain, the requery never seems to work for the first qualification!
For example:
If I enter a new starter onto FrmPersonnel, that's fine. If I then want to add a qualification I click the Cmd Button to open QualPopup, enter the qualification details, and close the Popup... I get no errors and return to the main form... I wait... but nothing shows on sFrmQuals. I then hit f5 on my keyboard and the record appears!
Having hit refresh manually, I can now hit the button again, add a second qualification or edit the first, and the changes show as soon as I close the Popup form.
So the code clearly works, just not for the first qualification. This is utterly baffling, does anyone have a clue why this is happening, or what I can do about it?
Many thanks as always
Alex S