Hi
It it possible to have more than 1 tables to be the Record Source of a form ?
If yes, how could it be done ?
I have tried relating 2 forms with primary key but this way only one table's fields becomes available to the form !
Thanks
Qi
You could remove the record source entirely (or have one form as the recordsource to fill in its share of the fields). Then for the other records, do:
Dim rs as DAO.recordset
set rs = DBEngine(0)(0).openRecordSet("SELECT * FROM table1 INNER JOIN table2 ON table1.somefield = table2.somefield WHERE someprimarykey = '"& txtprimarykey.value & "';") 'fill in field names as appropriate
You can then refer to each field from the join as a field of the recordset. Eg. if you field is called name, rs!name, so txtName.value = rs!name etc.
Hope this helps.