The most complex Visual Basic code we’ve examined thus far in this chapter is the procedure to build a search clause from the data you enter in the fdlgContactSearch form. Trust us—we’ve only started to scratch the surface.
One of the more complex pieces of code in the Conrad Systems Contacts sample database is triggered from the fsubContactEvents form that’s part of the frmContacts form. After signing in correctly to the application, the user can open the frmContacts form, click the Events tab, and add an event indicating the sale of a product. As soon as the user saves the record, code behind the subform automatically adds the product to the contact, as shown in Figure 25-24