Sendings e-mails....

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hola....I'm trying to send an e-mail with access, but I don't how pull a
specific number of Invoice,,.
for example I have a report named: "Invoices" wich contain

InvoiceNumber Product Description Qty PriceUnit Total

but when I want to send an e-mail with the report it pulls all Invoice, I'm
trying from an Form where I can see all descriptions.


well I hope your help..

Thanks..
(e-mail address removed)
 
Idiaz,

Do you want the report to be the InvoiceNumber of the current Invoice as
shown on the Form? If so, go the design view of the Query that the
Report is based on, and put the equivalent of this in the Criteria of
the InvoiceNumber field in the query...
[Forms]![NameOfYourForm]![InvoiceNumber]
 
Hi Steve,, I did that you tell me, But where do I need to added the
condition,,please see my programming and tell me please where is goes the
conditional thay you explained for me..

Thanks.


Private Sub SendEmail_Click()
On Error GoTo Err_SendEmail_Click

Dim stDocName As String “ declarando el combo de la direcciones de
correoâ€
Dim Documento As String “ declarando el attachmentâ€
If IsNull(CustomerID) Then
MsgBox "There is no e-mail address to send email to!", vbOKOnly, "Error"
CustomerID.SetFocus

Exit Sub

End If



stDocName = CustomerID.Column(2) “ El combo y quiero que me jale la
columna 2â€
Documento = "catalog" “Este es el nombre del archivoâ€

DoCmd.SendObject acReport, Documento, , stDocName

Exit_SendEmail_Click:
Exit Sub
Err_SendEmail_Click:
Select Case Err.Number
Case 0
Resume Next
Case Else
MsgBox Err.Number & ": " & Err.Description
End Select

Resume Exit_SendEmail_Click

End Sub





Steve Schapel said:
Idiaz,

Do you want the report to be the InvoiceNumber of the current Invoice as
shown on the Form? If so, go the design view of the Query that the
Report is based on, and put the equivalent of this in the Criteria of
the InvoiceNumber field in the query...
[Forms]![NameOfYourForm]![InvoiceNumber]

--
Steve Schapel, Microsoft Access MVP

Hola....I'm trying to send an e-mail with access, but I don't how pull a
specific number of Invoice,,.
for example I have a report named: "Invoices" wich contain

InvoiceNumber Product Description Qty PriceUnit Total

but when I want to send an e-mail with the report it pulls all Invoice, I'm
trying from an Form where I can see all descriptions.


well I hope your help..

Thanks..
(e-mail address removed)
 
ldiaz said:
Hi Steve,, I did that you tell me, But where do I need to added the
condition,,please see my programming and tell me please where is goes the
conditional thay you explained for me..

Thanks.


Private Sub SendEmail_Click()
On Error GoTo Err_SendEmail_Click

Dim stDocName As String “ declarando el combo de la direcciones de
correoâ€
Dim Documento As String “ declarando el attachmentâ€
If IsNull(CustomerID) Then
MsgBox "There is no e-mail address to send email to!", vbOKOnly, "Error"
CustomerID.SetFocus

Exit Sub

End If



stDocName = CustomerID.Column(2) “ El combo y quiero que me jale la
columna 2â€
Documento = "catalog" “Este es el nombre del archivoâ€

DoCmd.SendObject acReport, Documento, , stDocName

Exit_SendEmail_Click:
Exit Sub
Err_SendEmail_Click:
Select Case Err.Number
Case 0
Resume Next
Case Else
MsgBox Err.Number & ": " & Err.Description
End Select

Resume Exit_SendEmail_Click

End Sub





Steve Schapel said:
Idiaz,

Do you want the report to be the InvoiceNumber of the current Invoice as
shown on the Form? If so, go the design view of the Query that the
Report is based on, and put the equivalent of this in the Criteria of
the InvoiceNumber field in the query...
[Forms]![NameOfYourForm]![InvoiceNumber]

--
Steve Schapel, Microsoft Access MVP

Hola....I'm trying to send an e-mail with access, but I don't how pull a
specific number of Invoice,,.
for example I have a report named: "Invoices" wich contain

InvoiceNumber Product Description Qty PriceUnit Total

but when I want to send an e-mail with the report it pulls all Invoice, I'm
trying from an Form where I can see all descriptions.


well I hope your help..

Thanks..
(e-mail address removed)
 
Idiaz,

I was not referring to your code. The Record Source of your Report is
no doubt a Query. Go to the design view of the Report, and have a llok
at the Property Sheet, and look at the Record Source property. If it is
a saved query, than go to the design view of the query, and put the
reference to the Form control in the Criteria of the query.
 
I was having trouble sending email of one single invoice(from a report); it
was sending all my invoices. But now after fixing the criteria on the query,
the report shows only one invoice... but the info. on the invoice is not
organized ,is in three pages, instead of one... how can organize the info? To
look like my invoice form.
Thank you,
Larissa.
 

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

Back
Top