J
Jaybird
The syntax for subform references always gets me...
I have a main form called frmInvoice. On it I have two subforms called
qryLINPLAT and ChildsbfInvoice. I would like to set the value of a text box
(txtCreditMemo) on my ChildsbfInvoice form based on the value of the sum of
text box txtLineTotal on the subform qryLINPLAT. I've tried all kinds stuff,
but this is my code currently:
MyVariable = Sum(Me.Parent.qryLINPLAT.Form.txtLineTotal)
If MyVariable < 0 Then Me.txtCreditMemo = 0
If MyVariable >= 0 Then Me.txtCreditMemo = 1
I keep getting either an invalid reference error or a 'this object does not
support this property' error.
The purpose of this code is to set the value of txtCreditMemo (on the
ChildsbfInvoice subfrom) to zero if the sum of txtLINETOTL (on the qryLINPLAT
subform) is less than zero and to set the value of txtCreditMemo to 1 if the
sum of txtLINETOTL is greater than zero.
This will indicate to accounting if the invoice is a credit memo or not.
I have a main form called frmInvoice. On it I have two subforms called
qryLINPLAT and ChildsbfInvoice. I would like to set the value of a text box
(txtCreditMemo) on my ChildsbfInvoice form based on the value of the sum of
text box txtLineTotal on the subform qryLINPLAT. I've tried all kinds stuff,
but this is my code currently:
MyVariable = Sum(Me.Parent.qryLINPLAT.Form.txtLineTotal)
If MyVariable < 0 Then Me.txtCreditMemo = 0
If MyVariable >= 0 Then Me.txtCreditMemo = 1
I keep getting either an invalid reference error or a 'this object does not
support this property' error.
The purpose of this code is to set the value of txtCreditMemo (on the
ChildsbfInvoice subfrom) to zero if the sum of txtLINETOTL (on the qryLINPLAT
subform) is less than zero and to set the value of txtCreditMemo to 1 if the
sum of txtLINETOTL is greater than zero.
This will indicate to accounting if the invoice is a credit memo or not.