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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automate printing according to date specifications

Status
Not open for further replies.

jvhazelbaker

Programmer
Dec 15, 2004
38
US
I need a report to print according to the day of the week. So when a certain activity occurs on a Monday, Access pulls all activity reports associated with that day and prints them off automatically. Can this be done?
 
Yes it can be done. What have you tried so far? What's working? What's not working?

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I haven't tried anything so far, basically because I don't even know where to begin. Any starters would be helpful at this point.
 
Have you created a report? How will you process this exactly? Will you (or a user) click a button and get prompted to enter/select a day of the week, and the report shows items from that day? If a Monday, would it be every monday from the beginning of time until now? Or will you also be specifying a date range?

Please post your table structure (table name, fields, data types) and some sample data. Also post what you want the results to look like.

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Okay, I'll try to explain this a thoroughly as possible.

Table:

ID
Project
Project Start Date
Project Frequency in Days
Project Day of Week
Project Task Time

The query has all included and is pulled per day. There are five different queries, done per day with the day entered in the criteria per query, i.e., Project Day of Week = Like Monday.

The user will hit a button: Monday's Schedule, Tuesday's Schedule, and so on.

If the current day is equal to the Project Start Date, and the Project Day of Week is equal to the day the button is selected or to be daily, I want the project report to print on that day up until the Project Task Time expires. So the Project Task Time will be entered for example as 6750 (in minutes) so the length of time will be 3 weeks. After 6750 minutes in working business days, the project will expire and no longer print.

Can that be done?
 
Sure. But you have a coupla different things going on, so let's take one at a time. In the future I suggest you list sample data as well as what your desired output is for that sample data. It's also a good idea to list the data type along with your field names (i.e. Text, Date/Time, Integer, etc).

So, one thing is that you do not need 5 queries. A better idea would be to launch your queries and reports from your form where you/the user picks a day of the week from a combo box, hits a button, and opens the query/report. In the query/report, instead of the criteria saying "Like Monday", you'd put for example:

Code:
[Forms]![frmReportSelection]![cboDayOfWeek]

where "frmReportSelection" is the name of the form, and "cboDayOfWeek" is the name of the combo box.

Ok, I know you didn't ask for that, but I couldn't help myself....that being said, here's some questions:

1) why do you have in minutes? Why not the integer 3, which means 'weeks'? Is it because the project time may be different time periods, such as 'days', or 'months'? Do you convert weeks, days and months to minutes before entering it into the database?

2) You say that is working business days...how are you calculating that from minutes? Do you also have a table which records your company's holidays?

I think I understand the calculation you have, so if you answer these questions I'll get back to you on it.





Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
First, the reason I have five different queries rather than the combo box option is because this needs to require as little from the user as possible. So rather than having to select something from a list, there is a main form with a button per day that only needs to be clicked.

Let me explain the purpose of this program a little. It is being created for a group of laborers as a schedule of things to do per day. For example, mow the grass, sweep the club house porch, clean women's restroom, etc. There are 7+ zones (area of grounds), one person per zone. When Monday's button is selected, a report per zone is printed detailing each task to be done and the task time. Which brings me to the reason the task time is in minutes. Some tasks will take 15 minutes, others will take 3 weeks. On the report the total minutes are divided by 60 to give the laborers the task time. Company holidays are not an issue. As for the Frequency in Days, some tasks are done daily, some once per week, some every three years. So for those done once a week, the frequency would be entered as 7, every 7 days this should appear.

I hope this has made the program a little clearer. Let me know if you need further information.
 
Hi there. Sorry for all the questions. I get it for the most part, but still have some questions.

Some sample data and expected output would be nice. It's getting a little confusing around the Task Time and Frequency issues.

Also, I don't understand how 6750 minutes = 3 weeks?
And are weekends work days? is this a 7-day work week?

In your first post, you say that for the example with 6750 minutes, that is 3 weeks, and once that three weeks is over (three weeks from the Start Date, I presume?), this project will no longer print. But then you say a project can be 15 minutes in the last post. I guess I thought this meant that, say, every monday there will be a 15-minute task. Forever. So is the Project Task Time a 'time limit' or a 'task time'?

I think that some sample data and how you want it output will clear up a lot of my questions.

Thanks--g

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