If you have any interest in VBA and Dynamics GP, this is worth reading. It's a technique that I have not seen any documentation on.
The task is to default the Territory ID field in the Customer Maintenance form in Dynamics GP.
Normally, we'd trap the CHANGED event on the CUSTNMBR field and populate the Territory ID field, but the CHANGED event occurs before the form is populated so the default value gets wiped out when the form populates.