Hi,
Thanks for your suggestion but I still can't make it work.
The code for the event procedure 'after update' on
form 'Heat' is:
-----------------------------------------------
Private Sub Form_AfterUpdate()
Dim stDocName As String
stDocName = "Query2"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Forms![Heat]![Results Subform].form.refresh
End Sub
------------------------------------------------
Query 2 adds a record to a table called 'Results' which is
displayed through a form called 'Results' which is a
subform of 'Heat'.
However, the subform is not refreshed by the code in
the 'After update' procedure but if I refresh the page
manually (through the drop down menus it does populate the
subform with the results of query2
Any thoughts?
Also, I'm afraid I don't understand your 2nd suggestion:
Forms![Form1].RecordSource = "SELECT YourTable1.* FROM
YourTable1 ORDER BY
Can you explain.
Thanks
Phil.
-----Original Message-----
How about:
Forms![MainForm1]![Subform].form.refresh
Alternatively, you could do:
Forms![Form1].RecordSource = "SELECT YourTable1.* FROM YourTable1 ORDER BY
YourTable1.ddate; "
Regards,
Al
Phil Hood said:
I have a main form (linked to a table) with an event
procedure that populates a 2nd table for which a subform
exists. The event procedure is set to occur 'After Update'
of the main form.
I want to be able to refresh the subform automatically so
it shows the data added by the event procedure of the main
form.
How do I do this?
Thanks for your help.
.