-
Help with Query
SELECT tblUser.Dept, TblUsedHour.UID, TblUsedHour.EmpID, TblUsedHour.PositionNum, TblUsedHour.UsedHour, TblUsedHour.UsedDate
FROM tblUser INNER JOIN TblUsedHour ON tblUser.EmpID = TblUsedHour.EmpID
WHERE (((TblUsedHour.UsedDate) Is Not Null And (TblUsedHour.UsedDate) Between [Forms]![Report Date Range]![BeginDate] And [Forms]![Report Date Range]![EndDate]))
ORDER BY tblUser.Dept, TblUsedHour.EmpID;
The above is a query called QryHourUsed (it works)
SELECT QryUsedHour.Dept, QryUsedHour.EmpID, Sum(QryUsedHour.UsedHour) AS SumOfUsedHour
FROM QryUsedHour
GROUP BY QryUsedHour.Dept, QryUsedHour.EmpID
ORDER BY QryUsedHour.Dept, QryUsedHour.EmpID;
The above is called QryTotalUsedHour
This query fails to execute unless I remove Sum(QryUsedHour.UsedHour) AS SumOfUsedHour
Can anyone please help me with this?
-
-
Can you post a zipped copy of your database? If so I'll take a look.
-
I'll see if I can provide the DB without the data. Whats your email address?
-
My workplace filters any attachments with mdb or zip suffixes so email is not really a good option. You can attach the zipped db to a post here by clicking the Go Advanced button, then scroll down and click the manage attachments button to upload the file. If possible, remove any sensitive data, but have enough data (fake or otherwise) to test that the query is working as expected.
-
I would email you a link (on my server) to the site that has the file if you cant receive attachments.
I'd rather not post the entire file on this forum(s)
-
Hi,
if the concern is data confidentiality you can make a copy of your db, and delete all the data, and forms etc that that are not pertinent to this question. Mainly I want to look at the table structure and the queries themselves.
That said, it would be nice to have a few records of data to be sure the queries are working the way you expect.
And the same IT dept that filters email also blocks file sharing sites....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules