sum calculated boxes from Detail section

qwertyjjj

Registered User.
Local time
Today, 01:56
Joined
Aug 8, 2006
Messages
262
Hi
Got a form with a Detail section that can have any number of textboxes in it depending on the data a query brings back:

e.g.

QueryID Calculatedtextbox
QueryID Calculatedtextbox
QueryID Calculatedtextbox
QueryID Calculatedtextbox

The Calculatedtextbox has a DSum function, which uses the QueryID (another textbox).

I then have a footer at the bottom and need to sum all of the textboxes. Is this possible? Access doesn't seem to like it...
 
Hi qwertyjjj,

Access usually requires a method to identify each box, so it would be best if each one had a unique identifier,

Calculatedtextbox1
Calculatedtextbox2
Calculatedtextbox3
Calculatedtextbox4

Do these calculations occurr when you open the form? Click a button? Or some other method?

I cannot see a problem with summing these numbers into another field, just need more info from you.

Robert88
 
any simple picture to us? because it really seem no problem with sum these number base on your description...
 
Hi qwertyjjj,

I have got three text boxes, txt1, txt2, txt3 and summed them upon hitting the sum button on the attached frmSum, is this what you were after?

Hope it helps.

Robert88
 

Attachments

Hi
The textbox is 1 box in the Detail section, which becomes about 10 boxes when you load it up so I can only ever give it one name.

For example, see the attached JPG.

So in the totals section, I need to sum the Detail section textbox above it but Access doesn't like it when I put in =DSum(Textbox1) and the textbox above is calculated rather than filled with data from a query.
 

Attachments

  • untitled.JPG
    untitled.JPG
    74.6 KB · Views: 137
Hi qwertyjjj,

What are you currently using to total that coloumn?

Robert88
 
At the moment, it's just an expression, which queries the DB and returns the total. What I would like to do is make all the textboxes query based and then I think it will be easy as I can just put in the query field, e.g. Sum([SQLQueryField])

?
 
Hi qwertyjjj,

Maybe your current statement has syntax errors?:rolleyes:

Robert88
 

Users who are viewing this thread

Back
Top Bottom