Inputting same data on identical Field Name on different table
Demir last edited by
currently i am new in ms access, And currently - as a trial and learning step - I created Two tables, and a Single Form that can be used to put a value to both tables, those are:
Table 1 - "Data 1", the Fields are:
ID, RegDates, CatName1, CatName2
Table 2 - "Data 2"
ID, RegDates, DogName1, DogName2
Form 1 - "Input Form"
I can't populate ID on both tables using Relationships, but I cant populate nor filling RegDate fields on both Tables using one single "Registration Date" Form on Input Form
How can I achieve filling both Field Name - which is RegDate - using only one single Input textbox on "Input Form"?
What I want is, If I entry the Registration Date on "Input Form" Both regDate field on Data 1 and Data 2 are filled
What is the relationship between table 1 and table 2? Is it one-to-one based on ID?
There are two ways you can do this. Either:
- Create a query with ID, RegDates, CatName1, CatName2, DogName1, DogName2 using the query builder or with the following SQL code, and then use that query as the Record Source of the Form:
SELECT Table1.ID, Table1.RegDates, Table1.CatName1, Table1.CatName2, Table2.DogName1, Table2.DogName2 FROM Table1 INNER JOIN Table2 on Table1.[ID] = Table2.[ID]
- Use a subform on the form with Table2 as the Record Source, linking its ID to the ID field from Table1 which is used as the main form's record source.
In general it's tidier to do something like (1) whereby you base the form record source on a query rather than the actual table data.
Hope this helps!