Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding a query row 1

Status
Not open for further replies.

tatika

MIS
Oct 6, 2003
35
US
Someone Please help.

I need to sum the row of data. This query is used for weekly time sheets for a group of employees. The date ranged 7 days at a time and lists employee name, and hours worked for each given day within the date range, eg., Mon: 7.5 hours, Tue: 8 hours, etc. I need a final column in the report to show the total hours worked for the employee.

My fields are: From |To | Total (which I formated as "Total: Format(([From])-([To]),"Short Time")" in order to show time as a number) | and a count field (formated as - Count: Sum(IIf(tblSchedule.ScheduleID=Yes,1,0))

I tried multiplying Total and Count as follows ( GTotal : Format(([From])-([To]),"Short Time")+[Count] ), but received error : #Error


If you know how to add a row in a query could you please let me know.

Thanks so much.
 
If you know how to add a row in a quer
Take a look at UNION query, ie:
SELECT col1,col2,...,colN
FROM ...
WHERE ...
UNION
SELECT fld1,fld2,...,fldN
FROM ...
WHERE ...

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top