When you use a lookup function to select values in a related table, you typically only display a subset of the fields in the lookup table.

In some situations, however, you may want to update more fields in the related lookup table than are displayed on the lookup form without having to close the current form.

Adding a Control to Open Another Form

If you are taking orders by phone, it is convenient when you can use a lookup function on the sales order form to find the customer numbers as the customers call in.

However, a customer could call in to order something and inform you that they have changed their address. It is time-consuming to have to close the sales order form, select the customer form, find the customer, change the address, and then return to the sales order form to start entering the order again.

A better solution would be to open the customer form directly from the sales order form, automatically select the appropriate customer record, update and close the customer form, and continue filling out the sales order form.

To open another form, you can add a control that has a PushAction property and run the customer form with parameters that select the correct record from the Customer table when you use the assigned control. You can use command buttons, menu items, check boxes, or option buttons.

See Also