Summing two columes (1 Viewer)

Geneo

Registered User.
Local time
Today, 13:35
Joined
Dec 31, 2002
Messages
11
Well I´m back for another simple question (atleast for the most of you databankers). I have used the following formular to add all of my given hh.mm. exceeding more than 24 hours. Now it would be nice if I could add these two results inorder to get a total of both fields. How is this possible ?

=Format(Int(Summe([R22]))*24+Stunde(Summe([R22]));"00") & ":" & Format(Minute(Summe([R22]));"00")

=Format(Int(Summe([R44]))*24+Stunde(Summe([R44]));"00") & ":" & Format(Minute(Summe([R44]));"00")

Thanks in advance.

Eugene Flaherty
 

Ally

Registered User.
Local time
Today, 13:35
Joined
Sep 18, 2001
Messages
617
I'm not sure whether you're using a report / form or a query - you have entered the "=" sign so I am presuming you're in a report / form.

In your form / report insert a new text box. Refering to your 2 textboxes, that contain the formulas you wish to add together, by their names (what they are called in the Name field in the properties box) enter the following formula in your new text box.

=[txtBox1]+[txtBox2]

If you are in a query, you should have entered a name before the formula, else Access will have entered Expr1 and Expr2 for you (which is what I'll use for this example).

In a new column in Design view of your query enter:

Total: [Expr1]+[Expr2]
 
Last edited:

Geneo

Registered User.
Local time
Today, 13:35
Joined
Dec 31, 2002
Messages
11
Sorry Alley but it didnt work. What does happend is, I recieve in my report both summs next to each other and not added together.

I am attaching the file so you can see my problem in the flightlog, bottom right. It should read 47:20.

Thanks anyway, we are getting closer.
 

Ally

Registered User.
Local time
Today, 13:35
Joined
Sep 18, 2001
Messages
617
Nothing's attached. I'm just going home, but will have another look tomorrow.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 07:35
Joined
Feb 28, 2001
Messages
27,314
It would help to know the formats of the actual columns.

Are you providing data in the form of text, as "hh:mm" ?

Or are they actually Date fields?

Or are they integer fields summing hours and minutes separately?

The answer to your question takes on at least three different forms depending on which of the above is correct? And, of course, a fourth form if none of the above is right....

Further, your problem might be compounded by the issue of the format in the data source for this thing from which you reported some code.
 

Geneo

Registered User.
Local time
Today, 13:35
Joined
Dec 31, 2002
Messages
11
My two fields are date fields with the format "09:00:00>LL;0;_"
in my table and in the report as "time24h". The singel colum addition works perfect but adding both together is the problem.

Thanks for your advise and cooperation.
 

Attachments

  • flightlog.txt
    287 bytes · Views: 131

Users who are viewing this thread

Top Bottom