How to create a multi-table input form in Microsoft Access?
9,808
The usual way of doing this is to create a combo box with two columns, the TypeID and TypeName fields from the second table, hide the first column, and bind the combo box to the TypeID field of the first table on your form.
The combo box wizard can do this for you, in fact.
Related videos on Youtube
Author by
Jader Dias
Perl, Javascript, C#, Go, Matlab and Python Developer
Updated on September 17, 2022Comments
-
Jader Dias over 1 year
Is it possible to a make a form in Microsoft Access where a you can create entries in 2 tables in the same page?
Imagine there is a table with 3 fields:
- ObjectId
- ObjectName
- TypeId
where
TypeId
is the PK of another table which has the following fields:- TypeId
- TypeName
I want to show in my form 2 editable text fields
- ObjectName
- TypeName
I want the user to be able to add both Objects and Types but, the way I am implementing it, it can only
- add a
Type
entry when adding aObject
- edit the associated
Type
when editing aObject
But I want to also be able to
- select a exisiting
Type
when adding aObject
- add a
Type
when editing aObject
In the same form
-
CodyChen about 10 yearsHave you thought about subforms? They can be appear to be a part of the actual form but in fact has different table properties. You link the two forms together by the master / child relationship. In this method you can update the master record while also update the child records.
-
Jader Dias over 13 yearsThat's exactly what I am doing.
-
David W. Fenton over 13 yearsAdding a new type involves using the NotInList event. The help file gives examples of how to do this.