Sum, Forms and Query prob with #Name? error

accesslevel

Registered User.
Local time
Today, 21:44
Joined
Feb 10, 2003
Messages
12
Hey all,

K, I have a form called frmInvoice and on that form I have a list box which shows all the invoice items relating to this invoice using an invoiceID field which is unique to each invoice. I want to display the total £ (pounds) of the invoice so I have a textbox called txtTotal which has a control source: =[Query1!Total] which as you can see gets its value from the Query1 Total field...

Query1 look like this:

first field:

invoiceid
tblInvoice
Group By

True
[forms]![frmInvoice].[invoiceCode]

second field:

Total: Sum([tblInvoice.quantity]*[tblProduct.price])

Expression

True

but the textbox only every days #Name? or #Error if I try other options???

Please help
 
A controlsource can be bound to a field in the form's recordsource or it may contain an expression. It may not refer to a field in another query. You should be able to use DSum() to get the total.
 

Users who are viewing this thread

Back
Top Bottom