Sending Report to a Fax Server

S

Suthee

Hi everyone. A quick question if I may.

My company finally purchased RightFax. I built a database a couple of years
ago that imports a CSV file containing a list of several hundred different
clients. Each of these clients is already setup in the database they are
being imported into.

Specifically, each client is in a table that has their NAME, CUSTID, FAX,
and LETTER. The letter is an OLE object in the form of a BMP or Word
Document. The letter is unique to each client, and sometimes the client may
have up to 3 letters. That being said, the client could have several
different records for each unique letter.

A query matches the client from the imported CSV file to their respective
record(s) in the database. This is done so I can match the fax and letter(s)
to each client.

Finally, a report is built from the aforementioned query. This report is a
text document for each customer that says a bunch of junk on the first page
(with the fax number) and the preceding pages would be each unique
letter--usually one, but it could be up to 3. So basically it is one GIANT
report that is then printed an manually faxed--yes we literally print and
fax this puppy by hand!

So finally my question: I need to have each individual client report export
to an Access SNP (snapshot) file from my query with the FAX number as the
file name. Then I can feed it to the fax server.

I have no idea how to tell Access how to (1)loop through each record, (2)
create a unique report for each record, (3) export it to snapshot, and (4)
name it the fax number.

If anyone could help me with this, I would be your biggest fan as it would
literally save us HOURS each day.

Thanks in advance to anyone that could share their expertise with me.
 
G

Guest

Begin by building a form with a combo box that allows you to select the
customer you want a report for, in the query you use as the record source for
your customer reports, place that combo box as the criteria for the customer.
Finally place a command button on your form that opens the report for the
customer you choose with the combo box. Get that much working first.
 
G

Guest

Sorry about the delay, work crisis yesterday

Dim rs As ADODB.Recordset

Set rs = New ADODB.Recordset

rs.Open "NameOfYourTable", CurrentProject.Connection, adOpenStatic

Do Until rs.EOF

[Forms]![yourform].[txtbox].Value = rs![Name]
[Forms]![yourform].[txtbox].Value = rs![E_Mail]

On Error Resume Next
DoCmd.SendObject acSendReport, "rpt_yourreport", acFormatSNP,
[Forms]![frm_EMail].[txtEmail], , , "subject", , True

On Error Resume Next
rs.MoveNext

The above will loop through the records placing the customer references
correctly and generate an individual email with your report attached.

I do not know how to move from this place to a fax, but maybe another does
and will offer a solution.

Hope this helps you in some way.
 
S

Suthee

Thanks!

I think this will work; however, I would like to export the files to a
directory on the server rather than sending them in an e-mail. The fax
server will check the folder and automatically fax anything in it. How
would I modify your code to do that?

Thanks.


Jeff C said:
Sorry about the delay, work crisis yesterday

Dim rs As ADODB.Recordset

Set rs = New ADODB.Recordset

rs.Open "NameOfYourTable", CurrentProject.Connection, adOpenStatic

Do Until rs.EOF

[Forms]![yourform].[txtbox].Value = rs![Name]
[Forms]![yourform].[txtbox].Value = rs![E_Mail]

On Error Resume Next
DoCmd.SendObject acSendReport, "rpt_yourreport", acFormatSNP,
[Forms]![frm_EMail].[txtEmail], , , "subject", , True

On Error Resume Next
rs.MoveNext

The above will loop through the records placing the customer references
correctly and generate an individual email with your report attached.

I do not know how to move from this place to a fax, but maybe another does
and will offer a solution.

Hope this helps you in some way.
--
Jeff C
Live Well .. Be Happy In All You Do


Suthee said:
Thanks for the reply. I've been able to do that. What to do next?
 
G

Guest

Do a lookup up in this forum for "send report to fax", you may find an answer
that way.

you could try modifying the code to reflect just printing each report and
naming your fax as the printer.
--
Jeff C
Live Well .. Be Happy In All You Do


Suthee said:
Thanks!

I think this will work; however, I would like to export the files to a
directory on the server rather than sending them in an e-mail. The fax
server will check the folder and automatically fax anything in it. How
would I modify your code to do that?

Thanks.


Jeff C said:
Sorry about the delay, work crisis yesterday

Dim rs As ADODB.Recordset

Set rs = New ADODB.Recordset

rs.Open "NameOfYourTable", CurrentProject.Connection, adOpenStatic

Do Until rs.EOF

[Forms]![yourform].[txtbox].Value = rs![Name]
[Forms]![yourform].[txtbox].Value = rs![E_Mail]

On Error Resume Next
DoCmd.SendObject acSendReport, "rpt_yourreport", acFormatSNP,
[Forms]![frm_EMail].[txtEmail], , , "subject", , True

On Error Resume Next
rs.MoveNext

The above will loop through the records placing the customer references
correctly and generate an individual email with your report attached.

I do not know how to move from this place to a fax, but maybe another does
and will offer a solution.

Hope this helps you in some way.
--
Jeff C
Live Well .. Be Happy In All You Do


Suthee said:
Thanks for the reply. I've been able to do that. What to do next?


Begin by building a form with a combo box that allows you to select the
customer you want a report for, in the query you use as the record
source
for
your customer reports, place that combo box as the criteria for the
customer.
Finally place a command button on your form that opens the report for
the
customer you choose with the combo box. Get that much working first.
--
Jeff C
Live Well .. Be Happy In All You Do


:

Hi everyone. A quick question if I may.

My company finally purchased RightFax. I built a database a couple of
years
ago that imports a CSV file containing a list of several hundred
different
clients. Each of these clients is already setup in the database they
are
being imported into.

Specifically, each client is in a table that has their NAME, CUSTID,
FAX,
and LETTER. The letter is an OLE object in the form of a BMP or Word
Document. The letter is unique to each client, and sometimes the
client
may
have up to 3 letters. That being said, the client could have several
different records for each unique letter.

A query matches the client from the imported CSV file to their
respective
record(s) in the database. This is done so I can match the fax and
letter(s)
to each client.

Finally, a report is built from the aforementioned query. This report
is
a
text document for each customer that says a bunch of junk on the first
page
(with the fax number) and the preceding pages would be each unique
letter--usually one, but it could be up to 3. So basically it is one
GIANT
report that is then printed an manually faxed--yes we literally print
and
fax this puppy by hand!

So finally my question: I need to have each individual client report
export
to an Access SNP (snapshot) file from my query with the FAX number as
the
file name. Then I can feed it to the fax server.

I have no idea how to tell Access how to (1)loop through each record,
(2)
create a unique report for each record, (3) export it to snapshot, and
(4)
name it the fax number.

If anyone could help me with this, I would be your biggest fan as it
would
literally save us HOURS each day.

Thanks in advance to anyone that could share their expertise with me.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top