Emailing of Completed Access Data Input Forms

striker

Useless and getting worse
Local time
Today, 16:20
Joined
Apr 4, 2002
Messages
65
I have an Access 97 Form, which replicates an existing paper form. The paper form is faxed around the bazaars for various people to action. When the Access form is raised it is filled in with part of the data and then when the paper form is returned the rest of the data is filled in from the paper copy.

What I want to do is to email the partly completed form to the appropriate recipients.

Q1 Is this possible.

Q2 Some pointers or an example would be gratefully accepted.


Thanks in advance
 
You can use the SendObject command to send an email.

You can do it with a macro if you want but for further flexibility then VBA is the way to go.
 
I would create a report that mimics the form, place a button on the form to email the report. If you use the command button wizard it will walk you through it completely. Couple of things to note though.

1) The report will be in snapshot format (an Access add on) that requires the receipients to have the snapshot viewer. Free download from Microsoft.

2) You will have to enter the email addresses. When you press the button the snapshot is created and attached to the email. The email window opens.

3) You need to alter the VBA event so that you save the record before sending the report.

Here is the code that is behind my Send Report button.

Code:
Private Sub btnSendReport_Click()
On Error GoTo Err_btnSendReport_Click
'Checks for empty field value, it not empty then proceeds
If Not cboECNLookup.Value = "" Then

    Dim stDocName As String

stDocName = "rptECNBCNVIP"
If InStr(UserGroups(), "admingrp") > 0 Then
DoCmd.RunCommand acCmdSaveRecord
'checks to see what usergroup the user belongs to
ElseIf InStr(UserGroups(), "entryrp") > 0 Then
Me.ECN_Analyst.SetFocus
DoCmd.RunCommand acCmdSaveRecord
End If
DoCmd.SendObject acReport, stDocName, "Snapshot Format"


Else: MsgBox "Please select an ECN Number from the drop down list on the left."
End If
Exit_btnSendReport_Click:
    Exit Sub

Err_Label94_Click:
    MsgBox Err.Description
    Resume Exit_btnSendReport_Click
    
End Sub
 

Users who are viewing this thread

Back
Top Bottom