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

Reporting, Printing & Emailing

Status
Not open for further replies.

mfreeze

Programmer
Sep 11, 2003
16
0
0
US
What is the best way to collect quantity data from a table and email to recipients from within fox. For example: I need to open a table, have the process tell me that within this table I have 30 records of type x, 5000 records of type y, etc... and then email this data to a pre-determined list of recipients.


Thanks in advance for your help.

Regards,
Mark.
 
mfreeze

Ok, we need a little help here, how far did you get with this process and at what point are you encountering a probelm?.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
This is a working program to which I want to add some automated functions.

We receive about 30 text files per day that this program opens, converts to a table, and appends to a 'master' table. The program also reports it's data to the main app screen, letting the user know that file1 had 30 records, file2 had 60 records, etc... Then we use the compiled table in other applications. We then start outlook and type in this data from the fox main screen and send it to the same people, day after day.

What I am wanting to automate is this: Instead of reporting the file quantites to the screen, I'd like to (as a seperate process) have a prg that would analyze the table to see how many records are code1, code2, etc... and email this data to a list of pre-defined recipients. I want all of this to go on without any user interaction, except for actually starting the program, of course.

Thanks,
Mark.
 
mfreeze

Ok, this isn't a "total solution" type of forum, this is a forum that will guide you through problems, so far you haven't mention any difficuties you are having.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
The problem is this: I am looking for a method to gather the quantities of codes in a table, and email those results to a list of recipients. Any help is appreciated, even if you can just tell me how to construct an email programmatically.
 
mfreeze
Mr.Gagnon is trying to help if you can be more specifc.

I am looking for a method to gather the quantities of codes in a table

do you mean something like
select count(A.code) from codeTable A where A.code ="somecode"


email those results to a list of recipients

look under FAQ section (COM and Automation), there is a wealth of samples regardin outlook and other e-mail methods.
 
I don't know how I can be any more specific. I am not asking anynoe to write an app for me, but I was just wondering if someone could point me in the right direction as to how to email in an automated fashion from fox.

Let's say that I have the following conditions in a table:

Record# - Name - Value
1 - Bill - 7
2 - Bill - 5
3 - Bill - 7
4 - Tom - 5
5 - Tom - 5

What I am wanting to do, is programatically send an email saying:

to: recipient@test.com
from: me@test.com

Bill has 3 entries
Tom has 2 entries

My two issues are:

What do you feel is the best way to look at a table and total records by a field. (Some call this a distribution report)

How do I begin to send email from fox as I have never done this before.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top