0

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"

ID

Registration Dates

CatName1

CatName2

DogName1

DogName2

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

Thanks!

1 Answer 1

0

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:

  1. 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]
  1. 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!

1
  • Yes its true Table1 and Table2 is one-to-one based on ID. Holy solution number 1 seems feasible, and i think it really needs me to put some script. Thanks for your answer @slimn, will try it on my free times. Much appreciate :]].
    – Idad
    Feb 26, 2022 at 4:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.