Error code in a subform

Joe8915

Registered User.
Local time
Today, 14:53
Joined
Sep 9, 2002
Messages
820
I have done this a thousand times never had a problem before.

Trying to get a sum on a subform.

The field is called PayAmount. In my query it looks like this:
PayAmount: Round(CCur(Nz(DateDiff("n",[Strttime],[Endtime])*[AHrRate]/60,0)),2).

In my subform I added a text field and added the following
=sum([PayAmount]) and I get a error.
I did place the text box in the Footer
Any ideas?

Thanks
 
I thought I might try a differen't approach for a little bit more of a understanding:

In my query I have the following:

Strrttime

Endtime

Minutes: DateDiff("n",[Strttime],[EndTime])

Total Hrs Work: [Minutes]\60 & Format([Minutes] Mod 60,"\:00")

PayAmount: Round(CCur(Nz(DateDiff("n",[Strttime],[Endtime])*[AHrRate]/60,0)),2)

Everything works great, EXCEPT trying to get the AHRate times the total hours.

I tried =sum([AHRate]*[Total Hrs work)

My format for Total hrs looks like this:

6:30 which is 6 hours and 30 minutes my hourly rate is $7.00 per hour.

How do I make this work?

I thought I might add the db and maybe someone will be able to help me out. This just blowing my mind.
Now I have a second issue with the sub form. Trying to add the total dollars. I can't make that work either. As far as I can tell it’s the format that I have in the query.

Any help would be appreciated
 

Attachments

Last edited:

Users who are viewing this thread

Back
Top Bottom