I’m new at this I have a “Customers” main form that has several subforms. The “Customer’s Applications” subform displays a list of “Applications” associated with the main form’s current customer record. A Customer can have many Applications and an Application can be used by many Customers, so we’re talking about three tables: the Customers table, the Applications table, and the CustomerApplications “junction” table.
The “Customer’s Applications” subform is defined as a continuous form box that gets all records from the CustomerApplications junction table that match the main form’s current Customer. The subform has one field, a combo box that’s populated from the Applications table. When you select an Application in the combo box, that Application gets added to the CustomerApplications table for the current customer. The main form, subform, combo box, and table structure is working correctly, and I’m sure this whole database is very generic.
One of the entries in the Applications table is “(New Application)”. The AfterUpdate event for the combo box tests for that value and opens up an “Applications Table Maintenance” form (not a subform of the main form or the Applications subform) that lets me maintain the Applications table (e.g., add a new Application to the list). That’s working well – I get to the Applications Maintenance form as expected, where I add a new record to the Applications table..
Here’s my problem: when I close the “Applications Maintenance” form and get back to the main form/subforms, the application that I just added to the Applications table doesn’t show up in the subform’s combo boxes until I click in one of them and press F9. What’s driving me crazy is trying to find the correct event to hook the SendKeys F9 action to. What’s the event that fires when I return from the “Applications Maintenance” form to the “Applications” subform? “OnCurrent” fires, but since it also fires when I SendKey the F9 I can’t use it.
I hope you can decipher my ramble and get me on the right path!
Thanks.