DSUM for one record

S

Sammie

I am calculating a total from a table called "allocation" and using the Dsum
function below on an update query to put that total in the table called
"shipments". This works ok, but I would like to be able to put that same
total on just one record on a form based on the "shipments" table after
updating the record instead of updating all the records in my table. What
should the data value be on the control to do this? I either get huge
numbers or #Name? errors when I put the following dsum statement in the
field.



DSum("[BankAmount] + [BankFees]","Allocation","[LookUptoshipments] = " &
[Lookuptoshipments])

I will be grateful for any help.
Sammy
 
W

Wayne Morgan

To place that equation in the Control Source of a textbox, you need to
precede it with an equal sign. Also, if [Lookuptoshipments] at end is the
name of a field and there is a textbox on the form with the same name, you
may get an error. You may need to change the name of the textbox (possibly
to txtLookuptoshipments) to give a unique name.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top