DSum values problem

On a report I am trying to use VBA code to sum hours on a text field in the onprint event of the report.  

Here is what I'm attempting to write:

Me.txtGrp1RegHrs = DSum("RegHrs", "tblTimeCardTranxDetail", "tblTimeCardTranxHeader.TranxDate" is between Forms!frmSelectDatesForHRreport.txtStart and Forms!frmSelectDatesForHRreport.txtEnd

Note that the criteria uses a separate table.field.  Also, I know this syntax is wrong.

Can this be done?
Who is Participating?
Jeffrey CoachmanConnect With a Mentor MIS LiasonCommented:

Me.txtGrp1RegHrs = DSum("RegHrs", "tblTimeCardTranxDetail", "tblTimeCardTranxHeader.TranxDate BETWEEN" & Forms!frmSelectDatesForHRreport.txtStart & " AND " &  Forms!frmSelectDatesForHRreport.txtEnd)
Jeffrey CoachmanMIS LiasonCommented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.