shabbaranks
Registered User.
- Local time
- Today, 14:56
- Joined
- Oct 17, 2011
- Messages
- 300
Hi,
Ive had a complete blank... Im trying to output my VBA code to a report but I cant for the life of me think how to do it.
Here is my code:
And my report is called TimeReport.
Any ideas please? Thanks
Ive had a complete blank... Im trying to output my VBA code to a report but I cant for the life of me think how to do it.
Here is my code:
Code:
Dim strEmployeeName As String
strEmployeeName = EnUsername
DoCmd.RunSQL "SELECT StrConv(Replace([sUser],""."","" ""),3) AS Employee, TimesheetTable.Activity, TimesheetTable.Hours, TimesheetTable.Description, TimesheetTable.[Task Date], TimesheetTable.ProjectRef " & vbCrLf & _
"FROM TimesheetTable " & vbCrLf & _
"WHERE (((StrConv(Replace([sUser],""."","" ""),3)) Like """ & strEmployeeName & """) AND ((TimesheetTable.[Task Date])>=#" & [Forms]![DateSelection_Frm]![txtWeekCommencing] & "# And (TimesheetTable.[Task Date]<= #" & [Forms]![DateSelection_Frm]![txtWeekEnding] & "#)) AND ((TimesheetTable.ProjectRef) Not Like ""CENG*""));"
And my report is called TimeReport.
Any ideas please? Thanks