0
votes

I have a sub form (continuous form) which shows the sum of Fee in a Text Box in the subform footer:

Text5 data =Sum(Fee). 

This works correctly. What I can't do is show that value in another Text Box on the main form. I have tried

TFees = Forms!frmInvoice![frmInvoiceDetails].Form.Text5

This shows nothing (Null?) on the main from. No errors. My data for the subform is:

SELECT 
    tblInvoiceDetails.InvoiceLookup, 
    tblInvoiceDetails.DiscLookup, 
    [ApplicantSurname] & ', ' & [ApplicantForenames] AS AppName, 
    [DBSFee]+[MyFee] AS Fee, 
    tblDisclosure.Client, 
    tblDisclosure.Payer 
FROM 
    tblInvoiceDetails 
INNER JOIN 
    tblDisclosure 
    ON tblInvoiceDetails.DiscLookup = tblDisclosure.ID 
WHERE 
    (((tblDisclosure.Payer)='Client')) 
ORDER BY 
    [ApplicantSurname] & ', ' & [ApplicantForenames]; 
2

2 Answers

0
votes

Try:

=Forms!frmInvoice!NameOfYourSubformControl.Form!Text5

Replace "NameOfYourSubformControl" with that name, not the name of the form.

0
votes

Try:

TFees.value = Forms("frmInvoiceDetails").Text5.value