Search code examples
ms-accessrecordssubform

Displaying records in an unrelated subform access 2010


I'm in a pickle. This is probably quite easy but I just cannot figure it out.

2 Tables with columns:

tbl_indicators | tbl_targets
ind_id         | id
ind_name       | ind_id
               | year
               | comment1
               | comment2

I have got an unrelated subform on a form. On the subform I have 3 textboxes; tbl_indicators.ind_name, tbl_targets.comment1, tbl_targets.comment2. Users need to be able to edit the comments. The subform should contain all the names from tbl_indicators and linked to each name the comment textboxes. So for example, if tbl_indicators got 10 names, the subform should view 10 records. How can I do this?


Solution

  • So this sub form is not a classic "child" table of the parent. However, this sub form is based on the above need displaying ing_name.

    The simple solution then is to build a query that left joins in the tbl_indiciator column of in_name.

    So just build a query like this:

    enter image description here The above is a left join query since it may be possible that there no corresponding tbl_indicators record.

    You continues sub form will thus look like this:

    enter image description here