Hello Richard, I have a problem and I'd very much appreciate your help. Specifically, in the order form (order detail subform) through the SQL Server, in the total price field, it doesn't loads the control source=Sum([ExtPrice3])+[Forms]![OrderF]![Packing]+[Forms]![OrderF]![Freight] . How could I handle this? Thank you very much in advance.
Hi,
It doesn't show an error. Actually, I have 3 different fields for packing, freight and total price, all are in the OrderdetailF subform. The freight and packing fields take their the control source from the Order form field (main form), the extprice3 control source takes its value from the OrderdetailQ query.
I agree with Alex. Break these down into individual calculations. Try with a LOCAL table. Do they still not work?
Despina KarayanniOP
@Reply 5 years ago
Hi, the local table worked fine! Also the separate calculations don't work. Maybe it is the one that you've said at the seminar that Access SQL Server database does not recognize the forms!orderf![field]. However, I have this in the order detail subform of the orderF main form. How could I resolve this?
Make sure the name of the field itself and the control source are the same thing. If you've got ExtPrice3 as the name of the control, but the field is called something else, the SUM won't work.
Despina KarayanniOP
@Reply 5 years ago
In continuity, the subform OrderdetailF has the OrderDetailQ query as recordsource. In this query, the field extprice3 is calculated as follows:
ExtPrice3: [ExtPrice]-[ExtPrice2]
ExtPrice: [OrderDetailT].[Quantity]*[InvoicePrice]
ExtPrice2: [Extprice]*[Reduction]
Not sure what the problem is. My first thought is something is spelled wrong or in the wrong place. Without seeing your database it's impossible to tell. I just went into my copy of the Access SQL Server database that's still connected online. I added a bogus TestValue field, add it to the subform, it SUMs up perfectly. No idea what the issue in your database is.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access SQL Server Lessons.