aemdenouden
Nieuwe gebruiker
- Lid geworden
- 17 dec 2005
- Berichten
- 3
Ik heb een probleem:
Ik heb een order systeem gemaakt met daarin een aantal tabellen.
Datum
------------
Datum ID
Omschrijving (bijvoorbeeld welke feestdag het is)
Afhalen op
Orders
--------------
Order ID
Datum ID
Klant ID
Op het bestelformulier heb ik nu een combobox bestaande uit alle mogelijke datums uit de tabel Datum. Nu moet Access echter niet de datum in de tabel Order zetten maar het bijbehorende Datum ID. Dit zou via lookup moeten gaan maar ik krijg het niet voor elkaar. Wie kan mij helpen.
Lookup fields that display values from a table or query
The most common Lookup list displays values looked up from a related table. For example, the SupplierID field in the Products table displays this Lookup list:
This list is created by looking up the SupplierID values in the Suppliers table and displaying the corresponding Supplier names. Picking a value from a Lookup list sets the foreign key value in the current record (SupplierID in the Products table) to the primary key value of the corresponding record in the related table (SupplierID in the Suppliers table). This creates an association to the related table to display (but not store) the Supplier names in the record. The foreign key (SupplierID) is stored but not displayed. For this reason, any updates made to the data in the Suppliers table will be reflected in both the list and records in the Products table. You must define a Lookup list field from the table that will contain the foreign key and display the Lookup list. In the above example, the Lookup list field would be defined from the Products table.
Ik heb een order systeem gemaakt met daarin een aantal tabellen.
Datum
------------
Datum ID
Omschrijving (bijvoorbeeld welke feestdag het is)
Afhalen op
Orders
--------------
Order ID
Datum ID
Klant ID
Op het bestelformulier heb ik nu een combobox bestaande uit alle mogelijke datums uit de tabel Datum. Nu moet Access echter niet de datum in de tabel Order zetten maar het bijbehorende Datum ID. Dit zou via lookup moeten gaan maar ik krijg het niet voor elkaar. Wie kan mij helpen.
Lookup fields that display values from a table or query
The most common Lookup list displays values looked up from a related table. For example, the SupplierID field in the Products table displays this Lookup list:
This list is created by looking up the SupplierID values in the Suppliers table and displaying the corresponding Supplier names. Picking a value from a Lookup list sets the foreign key value in the current record (SupplierID in the Products table) to the primary key value of the corresponding record in the related table (SupplierID in the Suppliers table). This creates an association to the related table to display (but not store) the Supplier names in the record. The foreign key (SupplierID) is stored but not displayed. For this reason, any updates made to the data in the Suppliers table will be reflected in both the list and records in the Products table. You must define a Lookup list field from the table that will contain the foreign key and display the Lookup list. In the above example, the Lookup list field would be defined from the Products table.