#### Re: The total from the subordinate form

nauf;
Me. Parent.39 = DSum ("[kg]", "[kg]", "[Date] =" and Me.)
or
Me. Parent.39 = DSum ("[kg]", "[kg]", "[Date] =" and Format (Me., "Short Date"))
And, generally, not clearly, for what it is necessary  on  that as so it is visible in the subordinate...
PS
Give  Pole39, Pole30 the realized names. Otherwise, in a week you will already puzzle that they mean and for what have been made...

#### Re: The total from the subordinate form

Looked at both variants. The same error.
In the subordinate form for one date can be from one to ten records. Therefore it is convenient to see on the principal form the total of all values for specific date.

#### Re: The total from the subordinate form

nauf;

``Dsum ("", "", "=#" and Format (me., "mm\/dd\/yy") and "#"``

#### Re: The total from the subordinate form

In functions DLookup, DSum, etc. date should have the same appearance, as well as in request, . MM/DD/YY.
If you need for "to see it conveniently" make fields calculated:
In sv-ve "the given fields Pole30:
=[Member name with the subordinate form].Form! [Date]
In sv-ve "the given fields Pole39:
=DSum ("[kg]"; "[kg]"; "[Date] =" and Format (Pole30; "\#MM\/DD\/YY\#"))
And code lines.

#### Re: The total from the subordinate form

Thanks all. Works as prompted sdku and Anatoly.

#### Re: The total from the subordinate form

I apologize. Made as Anatoly advised, but it works on the first record of the principal form. On other records of the principal form 30 shows date, and 39 empty and errors are not present!

#### Re: The total from the subordinate form

nauf;
And and in what form you process what event?

#### Re: The total from the subordinate form

nauf wrote:

There is principal form 1 and the subordinate form of Kg; On principal to the form there are fields Pole30 and Pole39. ....
In event subordinated forms "Current record" :....

thus the link in the field of the principal form should be full

``````Private Sub Form_Current () ' in the subordinate form
forms! .39=Dsum ("", "", "=#" and Format (me., "mm\/dd\/yy") and "#"
End sub``````

#### Re: The total from the subordinate form

After:
It concerns and to 30 (date)

#### Re: The total from the subordinate form

sdku, on the first record of the principal form works both the first and second your variant, on following records does not work also errors does not show.

#### Re: The total from the subordinate form

nauf;
a DB (or its problem part) th vaguely I suspect that the circuit not the correct

#### Re: The total from the subordinate form

In the subordinate table there can be some records with one date. At input (review) of the new data in the subordinate table it is necessary to see how many all "kg" for date of current record. I created two fields "Pole30" and "Pole39" on the principal form. In event "Current record" in the subordinate form wrote down:
Me. Parent.30 = Me.
Forms! [Data input].39 = DSum ("[kg]", "[Kg]", "[Date] =#" and Format (Me., "mm\/dd\/yy") and "#")
On  records of the principal form works correctly. On following records Pole30 it is deduced, and Pole39 - empty.

#### Re: The total from the subordinate form

Check up that in a column [Date] is not present nonzero time, differently will be nothing.
Well or simply select on an interval in one day:

``DSum ("[kg]", "[Kg]", "[Date] &gt;=#" and Format (Me., "mm\/dd\/yy") and "# and [Date] &lt;#" and Format (Me., "mm\/dd\/yy") and "# + 1")``

#### Re: The total from the subordinate form

I do not know how much correctly understood the task, but I would solve it so (the form the expenditure)