Add Table field values using VBA

  • Thread starter Thread starter Les
  • Start date Start date
L

Les

Hi, I have tried the following in the control Source of the text box:-

=DSum("[Kufner]+[Steyn]+[Remondini]+[Stadler]","tblTotalByrSuppliers")

In Other words i need to add the value of [kufner] (1), the value of
[Steyn](0), [Remondini](0)& [Stadler](1), giving me a total of 2.

I know it is not correct, but maybe this will give you an idea of what
i
am trying to achieve, maybe there is a way with code ?
 
=DSum("[Kufner]","tblTotalByrSuppliers") +
DSum("[Steyn]","tblTotalByrSuppliers") + (etc)


HTH,
 
Hello George, i have established that my code and yours work, but only
if there is a value ? I am making the table from a query, so some names
have no value and then the code does not work, any suggestions ??
 
=Nz(DSum("[Kufner]","tblTotalByrSuppliers"), 0) +
Nz(DSum("[Steyn]","tblTotalByrSuppliers"), 0) + (etc)
 

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

Similar Threads


Back
Top