subform has subform total

R

rudwan

hi
i have main form , has two subforms ,
subform1 described information of total invoices
subform2 , linked with subform1 on field [InvID] to
described the detailes of each invoice
described in subform1
i made unbound text box in subform1 to calculate total
amout of invoice like this :
TotalAmount==[Subform2].Form![SubTotal]
where subtotal is unbound text box on subform2 calucalte
sum amount
but it gives me error
i put unbound text on the main form to caluclate the same
formula , it gives me correct result
who do i put the correct formula in subform1 ?

S

Steve Schapel

Rudwan,

Best to do this in two steps. Put the unbound textbox on the main form,
as you have already tried, make this hidden probably, and let's say you
name it Subform2Total. Then, refer to main form control in your
subform1 textbox, like this...
=[Parent]![Subform2Total]

R

rudwan

ok . this way gives correct result . but for the current
record only . becauese it gives the same total for all
records in subform1

-----Original Message-----
Rudwan,

Best to do this in two steps. Put the unbound textbox on the main form,
as you have already tried, make this hidden probably, and let's say you
name it Subform2Total. Then, refer to main form control in your
subform1 textbox, like this...
=[Parent]![Subform2Total]

--
Steve Schapel, Microsoft Access MVP

hi
i have main form , has two subforms ,
subform1 described information of total invoices
subform2 , linked with subform1 on field [InvID] to
described the detailes of each invoice
described in subform1
i made unbound text box in subform1 to calculate total
amout of invoice like this :
TotalAmount==[Subform2].Form![SubTotal]
where subtotal is unbound text box on subform2 calucalte
sum amount
but it gives me error
i put unbound text on the main form to caluclate the same
formula , it gives me correct result
who do i put the correct formula in subform1 ?
.