| Lookup! | |||||||||||||||||
| Page 2: New...lookup field. | |||||||||||||||||
New ... lookup field ![]() The idea is to set the value for the Author field by picking it's email. I know this does not make much sense, but it will bring the lookup idea closer. In the New field form fill the boxes as on the picture below. We create a new AEmail field for the ApplicationTable dataset. As you can see from the picture, there are few very important properties you have to understand prior to working with lookup fields.
.Field Name is the name of the lookup field. Set it to AEmail. ![]() That's it. No code required. Start your project (or set Active property for both tables to True) and you can see that DBGrid, in the AName fields column, has a combo box with author emails. As you pick an email the corresponding author field changes. We are looking up an authors email to change the author. Note that AEMail is a read-only field. ![]() Note: the combo box in the cell of a DBGrid has nothing with the PickList property of Grid's column. This will be explained later in this chapter. Next page > The DBLookupComboBox looks up > Page 1, 2, 3, 4 DB Course Next Chapter >> |
|||||||||||||||||




