Unrelated Subform Not Updating Automatically

gschimek

Registered User.
Local time
Today, 10:14
Joined
Oct 2, 2006
Messages
102
This may be a simple question, but I'm not sure what to even search for. I have a form with multiple subforms. All the subforms have related fields that are linked via relationships. But one subform has no fields in common with the parent form.

I need to be able to have the subform update itself whenever the record is changed on the parent form. I can't figure out which event procedure to use. It updates correctly if I assign my procedure to the form_click sub, and then click each time I want it updated, but that's a pain. I've tried on load, on data change, on activate, on data set change, and a couple others, but nothing works automatically.

How can I make the subform run a subroutine each time the parent form changes records?
 
have you tried, 'before update', 'after update' and 'on change'?
 
if a subform is not related to the main form, how are you expecting it to change when you navigate to a different item in the main form?
 
Last edited:
Gemma-

That's exactly my problem. This subform is the same one you helped me on in the VBA section. The one that scans a directory and lists the files in it. It's set up to scan the directory of the person in the main form record, but the underlying tables for the form and subform are totally unrelated. Actually the subform's data source is only storing the names and locations of the files it's displaying. So that's why I can't really relate the forms or tables.


I tried beforeupdate, afterupdate. They didn't work either. I still have to revert to the onclick to get it to update.
 
Last edited:
you need on current then.

Each time you move to a new record in a form (including the first time it opens) it fires the current event.

Try that
 

Users who are viewing this thread

Back
Top Bottom