Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / January 2007

Tip: Looking for answers? Try searching our database.

Automating Individual reports to Lotus Notes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Colbou - 05 Jan 2007 21:36 GMT
I have a database which produces a report fro my staff detailing their
performance.  What I wish to do is automate the sending of them so that from
one button click the following happens

It takes the first person on the list
produces the report
saves it to disk
prints it out
opens Lotus notes
attaches it to an email

I am quite confident it can be done but my knowledge of vba etc is poor.
Give me macros and queries.

Thanks
Colin
Colbou - 05 Jan 2007 21:37 GMT
Should have said it was acess 97.

>I have a database which produces a report fro my staff detailing their
>performance.  What I wish to do is automate the sending of them so that from
[quoted text clipped - 12 lines]
>Thanks
>Colin
Steve Schapel - 06 Jan 2007 08:22 GMT
Colin,

I have never used Lotus Notes, but I understand that the SendObject
action will work fine if Notes is set up as your default email client.

Make a continuous view form that shows the staff members, and includes
also their email addresses.

You didn't mention, so I am assuming the report will be saved and
emailed as a Snapshot file.

Do you really want to save it to disk *and* print it *and* email it??

Ok, make your report so it is based on a query, where the Criteria of
the EmployeeID (or whatever field identifies each staff member)
references the current record on the form, using syntax such as...
 [Forms]![NameOfForm]![EmployeeID]

Make a macro like this...

Action: OutputTo
   Object Type: Report
   Object Name: YourReport
  <other arguments as required>
Action: OpenReport
   Report Name: YourReport
   View: Print
   Filter Name: <blank>
   Where Condition: <blank>
Action: SendObject
   Object Type: Report
   Object Name: YourReport
   Output Format: Snapshot Format
   To: =[EmailAddress]
   Edit Message: No
  <other arguments as required>
Action: GoToRecord
   Object Type: <blank>
   Object Name: <blank>
   Record: Next

Make another macro like this:

Action: RunMacro
   Macro Name: NameOfYourFirstMacro
   Repeat Count: <blank>
   Repeat Expression: [CurrentRecord]<=[RecordsetClone].[RecordCount]

Put a Command Button in the header section of the form, and assign this
second macro on its On Click event property.

Signature

Steve Schapel, Microsoft Access MVP

> I have a database which produces a report fro my staff detailing their
> performance.  What I wish to do is automate the sending of them so that from
[quoted text clipped - 12 lines]
> Thanks
> Colin
Colbou - 06 Jan 2007 23:39 GMT
Thanks Steve,
Will try it tomorrow.
Yes I do need to send, print and save.  My team are based all around Scotland
so I visit them.  Its easier to have a paper copy when sitting in a coffee
shop.
Colin

>Colin,
>
[quoted text clipped - 52 lines]
>> Thanks
>> Colin
Steve Schapel - 07 Jan 2007 01:47 GMT
Colin,

You have coffee in Scotland? <g>

I suppose it was the Save step that I was mostly questioning.

Signature

Steve Schapel, Microsoft Access MVP

> Thanks Steve,
> Will try it tomorrow.
> Yes I do need to send, print and save.  My team are based all around Scotland
> so I visit them.  Its easier to have a paper copy when sitting in a coffee
> shop.
> Colin
Colbou - 07 Jan 2007 09:30 GMT
The save aprt is realy for my records in case of issues.

I keep a whole coffee plantation in business with the amount I drink.

>Colin,
>
[quoted text clipped - 8 lines]
>> shop.
>> Colin
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.