Form events

eacollie

Registered User.
Local time
Today, 12:42
Joined
May 14, 2011
Messages
159
I have a main form with a subform. On one of the subform controls, there is a double-click event which brings up a lookup form. The user selects the record and this updates the table and closes the subform.

I want to refresh the other unbound controls on the subform when the user selects a value from the lookup form.

Which form event is used? I've tried on current, on activate, after insert, after update, on dirty, on focus and on data change from the main form without success. I've also tried several events from the subform, also with no success.

I hope this makes sense.

Thank you!
 
Thank you Pat. Which form event is used to refresh?
 
Try to use the Close event for the lookup form in order to update the controls.
Code:
 Private Sub Form_Close
  Forms!SubformName!ControlName = .... NewValue
End Sub
 
Thanks Mihail. It worked to refresh the main from the close event of the lookup form and then place the code to populate the fields in the current event of the subform.
 

Users who are viewing this thread

Back
Top Bottom