
28-Jul-2006, 08:13 AM
|  | Guest | | | | | | | | | | 2 Questions...Please help These questions may already be here but I can’t find them anywhere.
Q1- I have a report that I have set to give me start date and end date;
however, the person I am building this for wants to be able to enter the Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/10553-2-questions-please-help.html
start and end dates in a form to pull the report. I had seen someone post
this website on another forum: http://allenbrowne.com/casu-08.html,
I went there and tried it that way but I keep getting errors for these lines:
strWhere = strField & " Between " & Format(Me.txtStartDate, conDateFormat) _
& " And " & Format(Me.txtEndDate, conDateFormat)
DoCmd.OpenReport strReport, acViewPreview, , strWhere
I am not sure what I am doing wrong.
Q2-I have a table that list how many hours spent on each job, I have a
report that give me accumulative total per pay period spent on each. Now I Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10553
need a way to just pull each one and see how many hours worked on that job
for the quarter, week, month, pay period. What would be the best way to do
this?
Thank you in advance for your help!!
Do share your immediate thoughts or reactions on this issue? We value your views! Login Now! or Sign Up Today! to share your views with us.. Gurfateh! | 
28-Jul-2006, 08:13 AM
|  | Guest | | | | | | | | | | Re: 2 Questions...Please help Hi Ang
Answers inline...
"Ang" wrote in message
news:C170D4B1-EB8A-48C7-9DA6-0260031087A0@microsoft.com...
> These questions may already be here but I can't find them anywhere.
>
> Q1- I have a report that I have set to give me start date and end date;
> however, the person I am building this for wants to be able to enter the Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10553
> start and end dates in a form to pull the report. I had seen someone post
> this website on another forum:
> http://allenbrowne.com/casu-08.html,
>
> I went there and tried it that way but I keep getting errors for these
> lines:
>
> strWhere = strField & " Between " & Format(Me.txtStartDate, conDateFormat)
> _
> & " And " & Format(Me.txtEndDate, conDateFormat)
>
> DoCmd.OpenReport strReport, acViewPreview, , strWhere
>
> I am not sure what I am doing wrong.
Neither am I because you don't say what the error is that you are getting.
Have you declared the variables strReport, strField and strWhere, and the
constant conDateFormat?
Does strReport have a valid report name in it?
Does your form have two textboxes named txtStartDate and txtEnddate which Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10553
both contain dates?
It should look something like this:
Const conDateFormat = "\#mm\/dd\/yyyy\#"
Dim strReport as String
Dim strWhere as String
Dim strField as String
strReport = "Your report name here"
strField = "[Your date field name]"
strWhere = strField & " Between " & Format(Me.txtStartDate, conDateFormat) _
& " And " & Format(Me.txtEndDate, conDateFormat)
DoCmd.OpenReport strReport, acViewPreview, , strWhere
>
> Q2-I have a table that list how many hours spent on each job, I have a
> report that give me accumulative total per pay period spent on each. Now I
> need a way to just pull each one and see how many hours worked on that job
> for the quarter, week, month, pay period. What would be the best way to do
> this?
Assuming you know (or can calculate) the starting and ending dates for each
of these periods, you can use the technique you have above.
Create your report grouped by job number, with a section footer and an empty
Detail section. In the section footer you can put the details of the job
(number, name, description, etc) and a textbox showing =Sum([HoursWorked]).
Then open your report with different start and end dates depending on the
period you want.
--
Good Luck!
Graham Mandeno [Access MVP]
Auckland, New Zealand
> Thank you in advance for your help!!
>
> | 
28-Jul-2006, 08:15 AM
|  | Guest | | | | | | | | | | Re: 2 Questions...Please help Graham, THANK YOU soooooooooo very much, you are a life saver!!!
"Graham Mandeno" wrote:
> Hi Ang
>
> Answers inline...
>
> "Ang" wrote in message
> news:C170D4B1-EB8A-48C7-9DA6-0260031087A0@microsoft.com...
> > These questions may already be here but I can't find them anywhere.
> >
> > Q1- I have a report that I have set to give me start date and end date;
> > however, the person I am building this for wants to be able to enter the
> > start and end dates in a form to pull the report. I had seen someone post
> > this website on another forum:
> > http://allenbrowne.com/casu-08.html,
> >
> > I went there and tried it that way but I keep getting errors for these
> > lines:
> >
> > strWhere = strField & " Between " & Format(Me.txtStartDate, conDateFormat)
> > _
> > & " And " & Format(Me.txtEndDate, conDateFormat)
> >
> > DoCmd.OpenReport strReport, acViewPreview, , strWhere
> >
> > I am not sure what I am doing wrong.
>
> Neither am I because you don't say what the error is that you are getting.
>
> Have you declared the variables strReport, strField and strWhere, and the
> constant conDateFormat?
>
> Does strReport have a valid report name in it?
>
> Does your form have two textboxes named txtStartDate and txtEnddate which
> both contain dates?
>
> It should look something like this:
>
> Const conDateFormat = "\#mm\/dd\/yyyy\#"
> Dim strReport as String
> Dim strWhere as String
> Dim strField as String
> strReport = "Your report name here"
> strField = "[Your date field name]"
> strWhere = strField & " Between " & Format(Me.txtStartDate, conDateFormat) _
> & " And " & Format(Me.txtEndDate, conDateFormat) Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10553
> DoCmd.OpenReport strReport, acViewPreview, , strWhere
>
> >
> > Q2-I have a table that list how many hours spent on each job, I have a Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10553
> > report that give me accumulative total per pay period spent on each. Now I
> > need a way to just pull each one and see how many hours worked on that job
> > for the quarter, week, month, pay period. What would be the best way to do
> > this?
>
> Assuming you know (or can calculate) the starting and ending dates for each
> of these periods, you can use the technique you have above.
>
> Create your report grouped by job number, with a section footer and an empty
> Detail section. In the section footer you can put the details of the job
> (number, name, description, etc) and a textbox showing =Sum([HoursWorked]).
>
> Then open your report with different start and end dates depending on the
> period you want.
> --
> Good Luck!
>
> Graham Mandeno [Access MVP]
> Auckland, New Zealand
>
> > Thank you in advance for your help!!
> >
> >
>
>
> | 
Support Us! Become a Promoter! | | Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh! | (View-All)
Members who have read this thread : 0
| | There are no names to display. | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Tools | Search | | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is On | | | | » Gurbani Jukebox | Listen to Gurbani while surfing SPN! | » Active Discussions | | | | | ਨਾਮਾ Today 06:37 AM 2 Replies, 45 Views | | | | | | | | | | | | | | | | | | | | | | | | | » Books You Should Read... | | | |