D
David Portwood
I have a record for each contractual document (let's leave it general,
please). Actions are generated against that document. When all actions have
been resolved, the "owner" of the contractual document indicates completion
of document processing by filling in a DateCompleted field.
My Documents table is linked 1:M to an Actions table and I have a
corresponding form/subform. I want the DateCompleted field in the main form
to be disabled while there are any open Actions in the subform. To check for
this, what I do now is run a DCount() against the Actions table. This works,
but it seems unnecessarily time consuming to run a domain aggregate function
when the records are right there on the subform. It is rare to have more
than five actions for any one document.
The subform is in datasheet view, so I can't put a calculated field. I tried
code like the following in the main form's Current() event:
With Me.Actions.form.recordset
.findfirst "criteria indicating an open action"
Me.DateCompleted.enabled = .no match
end with
Doesn't work, I forget specifically why now. Anyway, the DCount() works, but
I'm hoping someone might have a faster way to do this.
please). Actions are generated against that document. When all actions have
been resolved, the "owner" of the contractual document indicates completion
of document processing by filling in a DateCompleted field.
My Documents table is linked 1:M to an Actions table and I have a
corresponding form/subform. I want the DateCompleted field in the main form
to be disabled while there are any open Actions in the subform. To check for
this, what I do now is run a DCount() against the Actions table. This works,
but it seems unnecessarily time consuming to run a domain aggregate function
when the records are right there on the subform. It is rare to have more
than five actions for any one document.
The subform is in datasheet view, so I can't put a calculated field. I tried
code like the following in the main form's Current() event:
With Me.Actions.form.recordset
.findfirst "criteria indicating an open action"
Me.DateCompleted.enabled = .no match
end with
Doesn't work, I forget specifically why now. Anyway, the DCount() works, but
I'm hoping someone might have a faster way to do this.