Interactive data entry and updating

We will, however, create a permanent relationship between the Phone Numbers and Contacts table, so that we can use a wizard to generate the data entry form.You'll find the Relationships window on the Database Tools tab in the Relationships group.The main thing to remember is this: a lookup field displays one value and stores another.When creating a query, expression, filter, or any other object that refers to a lookup field, you must remember to reference the stored value and not what the user sees.A phone number could belong to many contacts, but for the sake of simplicity, we're sticking with a one-to-many relationship. Notice in Figure A that Phone Description Lookup contains the lookup values Land and Cell.

interactive data entry and updating-17interactive data entry and updating-61interactive data entry and updating-41interactive data entry and updating-71

In the resulting Edit Relationship dialog shown in Figure B, click Create. Figure B The data entry form we'll create in step 4 is based on the query shown in Figure C.The choice to implement lookup fields will trickle down to all of its dependent objects, so forgetting the setup isn't an option.If there's any chance that your organization will upsize the Access database later, don't use lookup fields.Even if you're the only user for this database, I don't recommend this route. It's best to control or otherwise validate all input values, as much as possible.You can do so by creating a list control manually, or you can use a lookup field to generate the control for you.This article assumes that you know how to create tables, queries, and forms, and that you have a reasonable understanding of normalization and relationships.

763

Leave a Reply