P
Peter Hallett
A form is bound to Table_A but also needs to utilize fields from Table_B.
The two tables have no fields in common and, as a result, if both tables are
included in the form’s SQL statement, or (much the same thing) if the form is
bound to a query incorporating both tables, then no join can be established
between the tables and, as a result, even though the controls bound to
Table_B are hidden, and thus effectively read-only, data input to controls
bound to Table_A is rejected, with an error message declaring that a
non-updatable ‘snapshot-type record set’ has been established. The lack of
any connection between the two tables also precludes the use of form/sub-form
architecture.
Whist, after some reflection, that is understandable, it leaves a practical
difficulty. The form has to utilize data from Table_B. One solution is to
read the Table_B fields with a series of DLookups. That certainly works, and
avoids the non-updatable record set problem, but it is hardly elegant. With
a significant number of Table_B fields involved, it would be useful to be
able to read them with a single query but the original problem is then likely
to be re-encountered.
Clearly this is more a matter of style than substance but it would be
interesting to know whether less prolix solutions exists.
The two tables have no fields in common and, as a result, if both tables are
included in the form’s SQL statement, or (much the same thing) if the form is
bound to a query incorporating both tables, then no join can be established
between the tables and, as a result, even though the controls bound to
Table_B are hidden, and thus effectively read-only, data input to controls
bound to Table_A is rejected, with an error message declaring that a
non-updatable ‘snapshot-type record set’ has been established. The lack of
any connection between the two tables also precludes the use of form/sub-form
architecture.
Whist, after some reflection, that is understandable, it leaves a practical
difficulty. The form has to utilize data from Table_B. One solution is to
read the Table_B fields with a series of DLookups. That certainly works, and
avoids the non-updatable record set problem, but it is hardly elegant. With
a significant number of Table_B fields involved, it would be useful to be
able to read them with a single query but the original problem is then likely
to be re-encountered.
Clearly this is more a matter of style than substance but it would be
interesting to know whether less prolix solutions exists.