DSUM for one record

  • Thread starter Thread starter Sammie
  • Start date Start date
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
 
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.
 
Back
Top