I have a parent form called Property. Contains details about a property.
I have a second parent form called Entity. Contains details about a person.
I have a Join form that connects People to Property. This form is a SubForm to the Property form. You can select a property on the Parent Property form and then attach people to the Property. So one property can have many people joined to it.
The join form is a continuous form. I wanted to place two cascading combo boxes on the Join form but they don't work well in continuous forms. So I moved the cascading combo boxes to a modal form and they work fine. So you click a button on the Join Form screen and it opens the Modal screen with the combo boxes. You select attributes about the person that are specific to the Property. Form example
Combo Box 1 "EntityType" options include choices like:
Attorney
Client
Co Owner Non Active
Owner of record
Combo Box 2 "Relationship Type includes choices like:
Partner
Spouse
Domestic Partner
Trust Beneficiary
After you select your option, lets say Client, the Combo Box has an after update event that executes a SQL Update query and writes the choice to the proper record in the underlying table for the Join Form.
Then you select Relationship Type from the second combo box and after update it runs an identical UPDATE SQL statement and also writes the choice to the proper record in the underlying table for the Join Form.
All of this works fine. Modal Form fine, Cascading Combo Boxes work fine. It writes to the underlying table fine.
Here is my problem. The code writes the choices to the underlying table but I can't get the SubForm to refresh showing the new choices that are now written in the table. The only way I can get the subform to refresh is to close the Modal form and then press F5 to manually refresh. My understanding is that you cannot refresh anything until the Modal form is closed.
I have tried many different ways to no avail. My problem is to get the SubForm to automatically refresh immediately after the choice has been made or after the Modal form is closed. I simply cannot find an automated method to refresh the SubForm with the new data while the Modal form is open. I could close the Modal but I am not sure where to place a me.refresh command that fires after the Modal Form is closed.
I am not including code as all the code runs fine. I am not including Cascading Combo boxes because they work fine. It is only the refresh methodology I need to come up with.
I am attaching some screen snap shots that show the forms.
This snap shows the main form Property with its subform Joined Entities.
When you click on the Pick Type button it opens the modal form Select Relationship type.
When you pick a selection it is immediately written to the underlying fields in the Join Table but it does not refresh to the Sub Form.
I hope this is enough information. It would be a tremendous amount of work to explain everything leading up to where the refresh needs to happen since all that code works fine. I cannot post the database as the back end is SQL Server.
Thanks,
Phred