Sorry, this is still not working.
I have a Training Booking Main Form, with a sub form of a delegate list
(this list is based on a query showing the Name and Company Name of
delegates).
I click a button to either add a new company booking or select a delegate
from an existing company to edit the booking by deleting or adding a new
delegate for that company. This works perfectly.
However, when I close the form (New or Edit Booking) I would like the
Delegate list to update automatically - this is not happening.
On a few of the events (close, after update etc.) of the TB Bookings form
I
have tried entering
Forms.[frm Training Booking (Main)].[tbl TB Del Data].Form.Requery
but this shows an error of run time error 438 - object does not support
this
property or method.
I would appreciate some help please. Thank you very much for your time.
Kerry
Allen Browne said:
When would you like it?
In the AfterUpdate event of the form that made the changes? (Be sure to
use
the *form* event, not that of a control.)
In the Click event of a button?
Kerry Purdy said:
On what event do I put this code please?
Thank you
Kerry
:
You can programmatically requery the subform Sub1 with this line of
code:
Me.[Sub1].Form.Requery
If it is on another form, use this kind of thing:
Forms.[Form1].[Sub1].Form.Requery
I have a subform based on a query, I click a button to open a
further
form,
allowing to edit the underlying records. When I close the
"edit-form"
I
want
the subform to update. I can only do it by pressing F9. I have
tried
me.refresh and me.requery on got focus, open, load. I am sure I am
being
dim
- I have searched the other questions but still no joy.