PC Review


Reply
Thread Tools Rate Thread

Automatically generating a series of reports

 
 
=?Utf-8?B?Qm9iaw==?=
Guest
Posts: n/a
 
      6th Aug 2007
I have a database containing supplier data, one record for each supplier for
each month the supplier delivered product. The data describes on time
delivery performance and product quality. At the end of each month a report
is generated for each supplier, graphically depicting their performance. The
report is generated by entering data through a form. The current month would
be selected from a drop down list of the availble months in the database.
Once the current month is selected, a list of all suppliers with activity in
that month is available in a combo box drop down list. I then select each
supplier in turn and a report is generated which is saved to be printed
later. I have to manually select each supplier on the list. What I want to do
is automate this task. I have the list of suppliers and just want to run each
one in sequence. Anyone have any suggestions on how to do this?
 
Reply With Quote
 
 
 
 
=?Utf-8?B?RGFsZSBGeWU=?=
Guest
Posts: n/a
 
      6th Aug 2007
Bob,

I assume that you are updating the combo with the list of suppliers in the
AfterUpdate event of the CurrentMonth combo box.

What I would do is add a command button to your form (cmd_Rpt_All) or
something like that. In the click event of that button, do something like
the following. You want strSQL to have the same select statement as your
cbo_Company combo box. If this is a query, just use the query name enclosed
in quotes. This also assumes that the bound column of cbo_Company is the
first column.

Private sub cmd_Rpt_All_Click

Dim rs as dao.recordset
Dim strSQL as string

strSQL = "SELECT ......"
set rs = currentdb.openrecordset (strSQL,,dbfailonerror)

While not rs.eof

me.cbo_Company = rs(0)

'this line is not needed if there is no code in the
cbo_Company_AfterUpdate event
Call cbo_Company_AfterUpdate

'assumes that in manual mode, there is another command
'button that you have to click
Call cmd_Rpt_Company_Click

rs.movenext

Wend

End Sub

Why are you saving the report to be printed later? You could print the
reports at the same time, or even email the report directly to the recipients
at that time. Several years ago (before Outlook security was enhanced), I
had an application that did this to over 300 organizations at the beginning
of each month, using the SendObjects method. Now that the Outlook security
patch exists, this is a little more difficult, but it can be bypassed (google
on Outlook +security +CDOMessage).

HTH
Dale


--
Email address is not valid.
Please reply to newsgroup only.


"Bobk" wrote:

> I have a database containing supplier data, one record for each supplier for
> each month the supplier delivered product. The data describes on time
> delivery performance and product quality. At the end of each month a report
> is generated for each supplier, graphically depicting their performance. The
> report is generated by entering data through a form. The current month would
> be selected from a drop down list of the availble months in the database.
> Once the current month is selected, a list of all suppliers with activity in
> that month is available in a combo box drop down list. I then select each
> supplier in turn and a report is generated which is saved to be printed
> later. I have to manually select each supplier on the list. What I want to do
> is automate this task. I have the list of suppliers and just want to run each
> one in sequence. Anyone have any suggestions on how to do this?

 
Reply With Quote
 
=?Utf-8?B?Qm9iaw==?=
Guest
Posts: n/a
 
      7th Aug 2007
Thanks for the help Dale. You understand what I am doing here. After I select
the supplier I hit a "Run" button which calls for the report.

I appreciate your suggestion to directly email the results. We are planning
on doing that. Currently we send out 150 reports each month so you can
appreciate how this will help. I will be working on implementing this code in
the next couple of days.


"Dale Fye" wrote:

> Bob,
>
> I assume that you are updating the combo with the list of suppliers in the
> AfterUpdate event of the CurrentMonth combo box.
>
> What I would do is add a command button to your form (cmd_Rpt_All) or
> something like that. In the click event of that button, do something like
> the following. You want strSQL to have the same select statement as your
> cbo_Company combo box. If this is a query, just use the query name enclosed
> in quotes. This also assumes that the bound column of cbo_Company is the
> first column.
>
> Private sub cmd_Rpt_All_Click
>
> Dim rs as dao.recordset
> Dim strSQL as string
>
> strSQL = "SELECT ......"
> set rs = currentdb.openrecordset (strSQL,,dbfailonerror)
>
> While not rs.eof
>
> me.cbo_Company = rs(0)
>
> 'this line is not needed if there is no code in the
> cbo_Company_AfterUpdate event
> Call cbo_Company_AfterUpdate
>
> 'assumes that in manual mode, there is another command
> 'button that you have to click
> Call cmd_Rpt_Company_Click
>
> rs.movenext
>
> Wend
>
> End Sub
>
> Why are you saving the report to be printed later? You could print the
> reports at the same time, or even email the report directly to the recipients
> at that time. Several years ago (before Outlook security was enhanced), I
> had an application that did this to over 300 organizations at the beginning
> of each month, using the SendObjects method. Now that the Outlook security
> patch exists, this is a little more difficult, but it can be bypassed (google
> on Outlook +security +CDOMessage).
>
> HTH
> Dale
>
>
> --
> Email address is not valid.
> Please reply to newsgroup only.
>
>
> "Bobk" wrote:
>
> > I have a database containing supplier data, one record for each supplier for
> > each month the supplier delivered product. The data describes on time
> > delivery performance and product quality. At the end of each month a report
> > is generated for each supplier, graphically depicting their performance. The
> > report is generated by entering data through a form. The current month would
> > be selected from a drop down list of the availble months in the database.
> > Once the current month is selected, a list of all suppliers with activity in
> > that month is available in a combo box drop down list. I then select each
> > supplier in turn and a report is generated which is saved to be printed
> > later. I have to manually select each supplier on the list. What I want to do
> > is automate this task. I have the list of suppliers and just want to run each
> > one in sequence. Anyone have any suggestions on how to do this?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Generating time based series =?Utf-8?B?UGV0ZQ==?= Microsoft Excel Charting 1 19th Sep 2006 08:28 AM
Automatically Generating Next Number in a Series =?Utf-8?B?U2FyZ2VudEFQ?= Microsoft Access 3 16th Aug 2006 12:10 AM
How to change empty ranges from a plot series without generating e =?Utf-8?B?bHVpemF2YWxh?= Microsoft Excel Worksheet Functions 0 8th Aug 2006 11:26 PM
Generating Reports Using VB.net z Microsoft Dot NET Framework 0 26th Apr 2006 07:34 AM
Print a series of reports based on a single date and a series of numbers Bill R via AccessMonster.com Microsoft Access Reports 1 9th Sep 2005 12:53 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:15 PM.