JohnHarkins
MIS
This is a little more complicated that simply issuing a requery against the parent form in order to update the records in the main/parent form.
Instead of just a simple query, the main form first uses a bunch of combo boxes to select records to be displayed, the user then presses a command button on the main form to cause the selection to take place (using SQL for a SELECT and WHERE query) and then in the continuous form of the results it uses a little icon to go to the subform.
When a change is made to a record in the subform, I'd like the main form to be requeried. I've tried the parent.requery and that wasn't adequate. I then thought, "aha, if I just do a forms![formname].requery that should do it." That didn't work and, I presume, that's due to the fact that selecting records from the main form that then populates a continuous form a command button means that I'd have to "press" the command button to do the precise requery. If so, how do I "press" the command button in the main form using VBA in the subform?
All help is gratefully accepted!
Thanks,
John Harkins
Instead of just a simple query, the main form first uses a bunch of combo boxes to select records to be displayed, the user then presses a command button on the main form to cause the selection to take place (using SQL for a SELECT and WHERE query) and then in the continuous form of the results it uses a little icon to go to the subform.
When a change is made to a record in the subform, I'd like the main form to be requeried. I've tried the parent.requery and that wasn't adequate. I then thought, "aha, if I just do a forms![formname].requery that should do it." That didn't work and, I presume, that's due to the fact that selecting records from the main form that then populates a continuous form a command button means that I'd have to "press" the command button to do the precise requery. If so, how do I "press" the command button in the main form using VBA in the subform?
All help is gratefully accepted!
Thanks,
John Harkins