Andy said:
Thanks for this Brian, I am inclined to agree with you! The reason I opted
for using a query as the record source was because the many side of the
relationship holds historical data for the one side record. For the purposes
of data input only the most recent record needs to be displayed. Having
tried a simple form using a query as the record source as a test it seemed to
work - however, it obviously is fraught with other problems in reality.
Using Form/sub-forms is one option, the other one is to merge the 'one' and
'many' tables together since there are only 5 fields on the one side. I
realise this is 'bad' database design but it will be easier in terms of
designing the main form which already has 3 subforms on it.
Gotcha. I definitely wouldn't recommend denormalising your database to get
round what is basically an interface design issue. There's lots of ways you
could handle this. For a start, I don't see why the fact that you already
have three subforms should be a problem. Clearly you already have the
"many" side fields on the screen taking up as much room as they take up, so
why should it be a problem to have them displayed in a subform instead of on
the main form? If you do things like having the subform in Single Form view
rather than Continuous, and hiding the navigation buttons, then it needn't
even look much like a subform. Or, in the AfterInsert event of the main
form, you could pop up a dialog box for the entry of the child record.
If you do want to force a child record to be entered at the same time as the
main record, then your only option really is to use an unbound form, and to
code the updates within the scope of a single transaction. Theoretically,
since the introduction on Access 2002, it is possible to have multiple
updates by bound forms spanned by a single transaction, but I have spent
many hours working with this and I can promise you that not only is it very
tricky to implement, but it doesn't work properly either. If you want to
investigate further, I would suggest obtaining a copy of the Access 2002
Developer's Handbook.