Reloading a document

This is somewhat convoluted, so please bear with me.

I have a database which has a main document and related sub documents. The sub documents are displayed in an embedded view of the main document. The main document must contain some information from the sub documents (counts, for example) to be displayed in views. My problem is that the sub documents can be accessed and changed from the main document while it is in read mode. I am having trouble coming up with a way to updated the main document with this information that will not conflict with someone ELSE who has the main document open in edit mode.

For example, lets say my main document deals with a car dealership, and the sub documents are the cars. We want to keep a field on the main document to keep track of the number of blue cars on the lot. If I go into the main document in read mode, and then open up a car document and change the color from red to blue, that needs to be reflected on the main document. The problem is if someone else has the main document open in edit mode and is making changes to the dealership information, the two will conflict and information will be lost or a conflict document generated.

Because of the type of information and peculiarities of the use a view with child documents and totals can’t be used.

Any suggestions would be HUGELY appreciated.

Subject: Reloading a document

You can have a computed field with a dblookup of the children docs and then do your counts in that computed field. Then you don’t have to update the main docs.

Subject: RE: Reloading a document

The problem is that the sub documents can be modified while the main document is in read mode. Computed fields only get updated in edit mode.