Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Sending report by E-mail but with criteria or filter

Discussion in 'Information Technology' started by ldiaz, Oct 30, 2005.

  1. ldiaz

    ldiaz
    Expand Collapse
    Guest

    Hi all..
    I want to send a report but this function pull all Orders reports and I want
    just one accordings the Orders Form is opened,
    I have something similary in the Print Function to print the same report,
    but with this I don't have the problem because it's filtered by a Query with
    criteria, but to send individual Orders reports , I don't know how? Could
    anybody help me on this please.

    Thanks.
    Ldiaz


    """"here is the code that I have....
    ____________________________________________________________
    Private Sub mail_Click()
    On Error GoTo Err_mail_Click

    Dim stDocName As String
    Dim stdomail As String


    stDocName = "Orders" 'Report name
    stdomail = Me![SupplierID].Column(2) 'This column has the e-mail address
    DoCmd.SendObject acReport, stDocName, , stdomail, , , "Order Quotation",
    "Please confirm if this Order Quotation is correct with Product
    Name,Descripción & price!!"


    Exit_mail_Click:
    Exit Sub

    Err_mail_Click:
    MsgBox Err.Description
    Resume Exit_mail_Click

    End Sub
    _______________________________________________________
     
  2. Loading...

    Similar Threads Forum Date
    Sikh News Why This Sikh Cartoonist Is Sending A Postcard To Trump Every Day Breaking News Mar 23, 2016
    Canada Canada sending dossier on fraud immigration agents to Punjab Breaking News Sep 27, 2010
    UK British Sikh Report-2016 Breaking News Mar 24, 2016
    1984 The Story I Did Not Report In ’84 History of Sikhism Jun 28, 2015
    Opinion Top Green Beret Officer Forced to Resign Over Affair With WaPo Reporter Breaking News Jun 26, 2014

  3. '69 Camaro

    '69 Camaro
    Expand Collapse
    Guest

    Make a copy of your "Orders" report and name this copy "rptSingleOrder"
    because you are going to be making modifications to it programmatically, and
    you'll probably want to keep the original. Next, look at the
    rptSingleOrder's Record Source Property to find the query or table that's
    used as the record source. In the example below, I've used qryOrders, but
    you'll need to replace this name with your report's Record Source Property.
    Next, create a button on your Orders form and paste the following code in the
    form's module:

    Private Sub EMailRptBtn_Click()

    On Error GoTo ErrHandler

    Dim rpt As Report
    Dim sRptName As String
    Dim sMsg As String
    Dim stdomail As String

    sRptName = "rptSingleOrder"
    sMsg = "Please confirm if this Order Quotation is correct with " & _
    "Product Name, Descripción & price!!"
    stdomail = Me![SupplierID].Column(2) 'This column has the e-mail address

    DoCmd.OpenReport sRptName, acViewDesign
    Set rpt = Reports(sRptName)
    rpt.RecordSource = "SELECT * " & _
    "FROM qryOrders " & _
    "WHERE (OrderID = " & Me!txtOrderID.Value & ");"
    DoCmd.Close acReport, sRptName, acSaveYes

    DoCmd.SendObject acSendReport, sRptName, acFormatSNP, _
    stdomail, , , "Order Quotation", sMsg, False

    CleanUp:

    Set rpt = Nothing

    Exit Sub

    ErrHandler:

    If (Err.Number <> 2501) Then ' User didn't cancel E-Mail.
    MsgBox "Error in EMailRptBtn_Click( ) in" & vbCrLf & _
    Me.Name & " form." & vbCrLf & vbCrLf & _
    "Error #" & Err.Number & vbCrLf & vbCrLf & Err.Description
    End If

    Err.Clear
    GoTo CleanUp

    End Sub ' EMailRptBtn_Click( )

    .. . . where EMailRptBtn is the name of the button, rptSingleOrder is the
    name of the report that gets modified and sent as a snapshot to the
    recipient, SupplierID is the combo box that holds the E-Mail address,
    qryOrders is the data source for the orders, OrderID is the primary key for
    the data source, and txtOrderID is the text box that displays the OrderID.

    Save and compile the code, then return to the form and open it in Form View.
    Select the record to send the report to the recipient on the form, then
    select the EMailRptBtn to send it off without editing it. If you want to
    edit the E-mail before sending it, then change the last argument in the
    SendObject method to TRUE. If you want a different format than the snapshot
    format, then change acFormatSNP to a different format.

    And remember that SendObject can be buggy, especially when used in loops.

    HTH.
    Gunny

    See http://www.QBuilt.com for all your database needs.
    See http://www.Access.QBuilt.com for Microsoft Access tips.

    (Please remove ZERO_SPAM from my reply E-mail address so that a message will
    be forwarded to me.)
    - - -
    If my answer has helped you, please sign in and answer yes to the question
    "Did this post answer your question?" at the bottom of the message, which
    adds your question and the answers to the database of answers. Remember that
    questions answered the quickest are often from those who have a history of
    rewarding the contributors who have taken the time to answer questions
    correctly.


    "ldiaz" wrote:

    > Hi all..
    > I want to send a report but this function pull all Orders reports and I want
    > just one accordings the Orders Form is opened,
    > I have something similary in the Print Function to print the same report,
    > but with this I don't have the problem because it's filtered by a Query with
    > criteria, but to send individual Orders reports , I don't know how? Could
    > anybody help me on this please.
    >
    > Thanks.
    > Ldiaz
    >
    >
    > """"here is the code that I have....
    > ____________________________________________________________
    > Private Sub mail_Click()
    > On Error GoTo Err_mail_Click
    >
    > Dim stDocName As String
    > Dim stdomail As String
    >
    >
    > stDocName = "Orders" 'Report name
    > stdomail = Me![SupplierID].Column(2) 'This column has the e-mail address
    > DoCmd.SendObject acReport, stDocName, , stdomail, , , "Order Quotation",
    > "Please confirm if this Order Quotation is correct with Product
    > Name,Descripción & price!!"
    >
    >
    > Exit_mail_Click:
    > Exit Sub
    >
    > Err_mail_Click:
    > MsgBox Err.Description
    > Resume Exit_mail_Click
    >
    > End Sub
    > _______________________________________________________
    >
    >
    >
     
  4. Guest

    Guest
    Expand Collapse
    Guest

    application.Echo

    Docmd.OpenReport sRptName,,"where Invoice = '101'"

    DoCmd.SendObject acSendReport, sRptName, acFormatSNP, _
    stdomail, , , "Order Quotation", sMsg, False

    The report is open in preview mode before I sent it.

    (david)


    "ldiaz" <ldiaz@discussions.microsoft.com> wrote in message
    news:90E86CB9-8240-4C08-9F67-AE349A74F451@microsoft.com...
    > Hi all..
    > I want to send a report but this function pull all Orders reports and I

    want
    > just one accordings the Orders Form is opened,
    > I have something similary in the Print Function to print the same report,
    > but with this I don't have the problem because it's filtered by a Query

    with
    > criteria, but to send individual Orders reports , I don't know how? Could
    > anybody help me on this please.
    >
    > Thanks.
    > Ldiaz
    >
    >
    > """"here is the code that I have....
    > ____________________________________________________________
    > Private Sub mail_Click()
    > On Error GoTo Err_mail_Click
    >
    > Dim stDocName As String
    > Dim stdomail As String
    >
    >
    > stDocName = "Orders" 'Report name
    > stdomail = Me![SupplierID].Column(2) 'This column has the e-mail

    address
    > DoCmd.SendObject acReport, stDocName, , stdomail, , , "Order

    Quotation",
    > "Please confirm if this Order Quotation is correct with Product
    > Name,Descripción & price!!"
    >
    >
    > Exit_mail_Click:
    > Exit Sub
    >
    > Err_mail_Click:
    > MsgBox Err.Description
    > Resume Exit_mail_Click
    >
    > End Sub
    > _______________________________________________________
    >
    >
    >
     
  5. ldiaz

    ldiaz
    Expand Collapse
    Guest

    Hi camaro...I used your code but appear an error message that says:

    Error #3131
    Syntax error in FROM clause

    my query name is:Orders Query Invoice
    my form Name is "Orders" where I put the button
    my primary key is OrderID and it has the same name of text box.

    could you help me to fx this, I'm sure it work but I have a little problem.

    Thanks for your help..

    Ldiaz


    "'69 Camaro" wrote:

    > Make a copy of your "Orders" report and name this copy "rptSingleOrder"
    > because you are going to be making modifications to it programmatically, and
    > you'll probably want to keep the original. Next, look at the
    > rptSingleOrder's Record Source Property to find the query or table that's
    > used as the record source. In the example below, I've used qryOrders, but
    > you'll need to replace this name with your report's Record Source Property.
    > Next, create a button on your Orders form and paste the following code in the
    > form's module:
    >
    > Private Sub EMailRptBtn_Click()
    >
    > On Error GoTo ErrHandler
    >
    > Dim rpt As Report
    > Dim sRptName As String
    > Dim sMsg As String
    > Dim stdomail As String
    >
    > sRptName = "rptSingleOrder"
    > sMsg = "Please confirm if this Order Quotation is correct with " & _
    > "Product Name, Descripción & price!!"
    > stdomail = Me![SupplierID].Column(2) 'This column has the e-mail address
    >
    > DoCmd.OpenReport sRptName, acViewDesign
    > Set rpt = Reports(sRptName)
    > rpt.RecordSource = "SELECT * " & _
    > "FROM qryOrders " & _
    > "WHERE (OrderID = " & Me!txtOrderID.Value & ");"
    > DoCmd.Close acReport, sRptName, acSaveYes
    >
    > DoCmd.SendObject acSendReport, sRptName, acFormatSNP, _
    > stdomail, , , "Order Quotation", sMsg, False
    >
    > CleanUp:
    >
    > Set rpt = Nothing
    >
    > Exit Sub
    >
    > ErrHandler:
    >
    > If (Err.Number <> 2501) Then ' User didn't cancel E-Mail.
    > MsgBox "Error in EMailRptBtn_Click( ) in" & vbCrLf & _
    > Me.Name & " form." & vbCrLf & vbCrLf & _
    > "Error #" & Err.Number & vbCrLf & vbCrLf & Err.Description
    > End If
    >
    > Err.Clear
    > GoTo CleanUp
    >
    > End Sub ' EMailRptBtn_Click( )
    >
    > . . . where EMailRptBtn is the name of the button, rptSingleOrder is the
    > name of the report that gets modified and sent as a snapshot to the
    > recipient, SupplierID is the combo box that holds the E-Mail address,
    > qryOrders is the data source for the orders, OrderID is the primary key for
    > the data source, and txtOrderID is the text box that displays the OrderID.
    >
    > Save and compile the code, then return to the form and open it in Form View.
    > Select the record to send the report to the recipient on the form, then
    > select the EMailRptBtn to send it off without editing it. If you want to
    > edit the E-mail before sending it, then change the last argument in the
    > SendObject method to TRUE. If you want a different format than the snapshot
    > format, then change acFormatSNP to a different format.
    >
    > And remember that SendObject can be buggy, especially when used in loops.
    >
    > HTH.
    > Gunny
    >
    > See http://www.QBuilt.com for all your database needs.
    > See http://www.Access.QBuilt.com for Microsoft Access tips.
    >
    > (Please remove ZERO_SPAM from my reply E-mail address so that a message will
    > be forwarded to me.)
    > - - -
    > If my answer has helped you, please sign in and answer yes to the question
    > "Did this post answer your question?" at the bottom of the message, which
    > adds your question and the answers to the database of answers. Remember that
    > questions answered the quickest are often from those who have a history of
    > rewarding the contributors who have taken the time to answer questions
    > correctly.
    >
    >
    > "ldiaz" wrote:
    >
    > > Hi all..
    > > I want to send a report but this function pull all Orders reports and I want
    > > just one accordings the Orders Form is opened,
    > > I have something similary in the Print Function to print the same report,
    > > but with this I don't have the problem because it's filtered by a Query with
    > > criteria, but to send individual Orders reports , I don't know how? Could
    > > anybody help me on this please.
    > >
    > > Thanks.
    > > Ldiaz
    > >
    > >
    > > """"here is the code that I have....
    > > ____________________________________________________________
    > > Private Sub mail_Click()
    > > On Error GoTo Err_mail_Click
    > >
    > > Dim stDocName As String
    > > Dim stdomail As String
    > >
    > >
    > > stDocName = "Orders" 'Report name
    > > stdomail = Me![SupplierID].Column(2) 'This column has the e-mail address
    > > DoCmd.SendObject acReport, stDocName, , stdomail, , , "Order Quotation",
    > > "Please confirm if this Order Quotation is correct with Product
    > > Name,Descripción & price!!"
    > >
    > >
    > > Exit_mail_Click:
    > > Exit Sub
    > >
    > > Err_mail_Click:
    > > MsgBox Err.Description
    > > Resume Exit_mail_Click
    > >
    > > End Sub
    > > _______________________________________________________
    > >
    > >
    > >
     
  6. '69 Camaro

    '69 Camaro
    Expand Collapse
    Guest

    > could you help me to fx this

    Sure. You have illegal characters in the name of the query. Spaces aren't
    allowed. However, Jet often lets one "fix" these illegal characters if one
    puts brackets around a multiple-worded name. For example:

    rpt.RecordSource = "SELECT * " & _
    "FROM [Orders Query Invoice] " & _
    "WHERE (OrderID = " & Me!txtOrderID.Value & ");"

    There's no guarantee that illegal characters that are bracketed will work in
    every situation. Only use alphanumeric characters and the underscore
    character when naming any object (that includes tables and fields),
    procedure, or variable, and you will avoid many, many bugs.

    HTH.
    Gunny

    See http://www.QBuilt.com for all your database needs.
    See http://www.Access.QBuilt.com for Microsoft Access tips.

    (Please remove ZERO_SPAM from my reply E-mail address so that a message will
    be forwarded to me.)
    - - -
    If my answer has helped you, please sign in and answer yes to the question
    "Did this post answer your question?" at the bottom of the message, which
    adds your question and the answers to the database of answers. Remember that
    questions answered the quickest are often from those who have a history of
    rewarding the contributors who have taken the time to answer questions
    correctly.


    "ldiaz" wrote:

    > Hi camaro...I used your code but appear an error message that says:
    >
    > Error #3131
    > Syntax error in FROM clause
    >
    > my query name is:Orders Query Invoice
    > my form Name is "Orders" where I put the button
    > my primary key is OrderID and it has the same name of text box.
    >
    > could you help me to fx this, I'm sure it work but I have a little problem.
    >
    > Thanks for your help..
    >
    > Ldiaz
    >
    >
    > "'69 Camaro" wrote:
    >
    > > Make a copy of your "Orders" report and name this copy "rptSingleOrder"
    > > because you are going to be making modifications to it programmatically, and
    > > you'll probably want to keep the original. Next, look at the
    > > rptSingleOrder's Record Source Property to find the query or table that's
    > > used as the record source. In the example below, I've used qryOrders, but
    > > you'll need to replace this name with your report's Record Source Property.
    > > Next, create a button on your Orders form and paste the following code in the
    > > form's module:
    > >
    > > Private Sub EMailRptBtn_Click()
    > >
    > > On Error GoTo ErrHandler
    > >
    > > Dim rpt As Report
    > > Dim sRptName As String
    > > Dim sMsg As String
    > > Dim stdomail As String
    > >
    > > sRptName = "rptSingleOrder"
    > > sMsg = "Please confirm if this Order Quotation is correct with " & _
    > > "Product Name, Descripción & price!!"
    > > stdomail = Me![SupplierID].Column(2) 'This column has the e-mail address
    > >
    > > DoCmd.OpenReport sRptName, acViewDesign
    > > Set rpt = Reports(sRptName)
    > > rpt.RecordSource = "SELECT * " & _
    > > "FROM qryOrders " & _
    > > "WHERE (OrderID = " & Me!txtOrderID.Value & ");"
    > > DoCmd.Close acReport, sRptName, acSaveYes
    > >
    > > DoCmd.SendObject acSendReport, sRptName, acFormatSNP, _
    > > stdomail, , , "Order Quotation", sMsg, False
    > >
    > > CleanUp:
    > >
    > > Set rpt = Nothing
    > >
    > > Exit Sub
    > >
    > > ErrHandler:
    > >
    > > If (Err.Number <> 2501) Then ' User didn't cancel E-Mail.
    > > MsgBox "Error in EMailRptBtn_Click( ) in" & vbCrLf & _
    > > Me.Name & " form." & vbCrLf & vbCrLf & _
    > > "Error #" & Err.Number & vbCrLf & vbCrLf & Err.Description
    > > End If
    > >
    > > Err.Clear
    > > GoTo CleanUp
    > >
    > > End Sub ' EMailRptBtn_Click( )
    > >
    > > . . . where EMailRptBtn is the name of the button, rptSingleOrder is the
    > > name of the report that gets modified and sent as a snapshot to the
    > > recipient, SupplierID is the combo box that holds the E-Mail address,
    > > qryOrders is the data source for the orders, OrderID is the primary key for
    > > the data source, and txtOrderID is the text box that displays the OrderID.
    > >
    > > Save and compile the code, then return to the form and open it in Form View.
    > > Select the record to send the report to the recipient on the form, then
    > > select the EMailRptBtn to send it off without editing it. If you want to
    > > edit the E-mail before sending it, then change the last argument in the
    > > SendObject method to TRUE. If you want a different format than the snapshot
    > > format, then change acFormatSNP to a different format.
    > >
    > > And remember that SendObject can be buggy, especially when used in loops.
    > >
    > > HTH.
    > > Gunny
    > >
    > > See http://www.QBuilt.com for all your database needs.
    > > See http://www.Access.QBuilt.com for Microsoft Access tips.
    > >
    > > (Please remove ZERO_SPAM from my reply E-mail address so that a message will
    > > be forwarded to me.)
    > > - - -
    > > If my answer has helped you, please sign in and answer yes to the question
    > > "Did this post answer your question?" at the bottom of the message, which
    > > adds your question and the answers to the database of answers. Remember that
    > > questions answered the quickest are often from those who have a history of
    > > rewarding the contributors who have taken the time to answer questions
    > > correctly.
    > >
    > >
    > > "ldiaz" wrote:
    > >
    > > > Hi all..
    > > > I want to send a report but this function pull all Orders reports and I want
    > > > just one accordings the Orders Form is opened,
    > > > I have something similary in the Print Function to print the same report,
    > > > but with this I don't have the problem because it's filtered by a Query with
    > > > criteria, but to send individual Orders reports , I don't know how? Could
    > > > anybody help me on this please.
    > > >
    > > > Thanks.
    > > > Ldiaz
    > > >
    > > >
    > > > """"here is the code that I have....
    > > > ____________________________________________________________
    > > > Private Sub mail_Click()
    > > > On Error GoTo Err_mail_Click
    > > >
    > > > Dim stDocName As String
    > > > Dim stdomail As String
    > > >
    > > >
    > > > stDocName = "Orders" 'Report name
    > > > stdomail = Me![SupplierID].Column(2) 'This column has the e-mail address
    > > > DoCmd.SendObject acReport, stDocName, , stdomail, , , "Order Quotation",
    > > > "Please confirm if this Order Quotation is correct with Product
    > > > Name,Descripción & price!!"
    > > >
    > > >
    > > > Exit_mail_Click:
    > > > Exit Sub
    > > >
    > > > Err_mail_Click:
    > > > MsgBox Err.Description
    > > > Resume Exit_mail_Click
    > > >
    > > > End Sub
    > > > _______________________________________________________
    > > >
    > > >
    > > >
     
  7. '69 Camaro

    '69 Camaro
    Expand Collapse
    Guest

    Oops. You mentioned "has the same name of text box" and I mistranslated that
    to mean the same name as I had given the text box, not the text box with the
    same name as your primary key. Try:

    rpt.RecordSource = "SELECT * " & _
    "FROM [Orders Query Invoice] " & _
    "WHERE (OrderID = " & Me!OrderID.Value & ");"

    Sorry for any confusion. And if you want to avoid bugs in the future, don't
    accept the default names that Access gives for the controls that are going to
    be referenced either in VBA code, as shown above, or as a property. Rename
    these controls to something like txtOrderID, which indicates it's a text box
    displaying the OrderID field.

    HTH.
    Gunny

    See http://www.QBuilt.com for all your database needs.
    See http://www.Access.QBuilt.com for Microsoft Access tips.

    (Please remove ZERO_SPAM from my reply E-mail address so that a message will
    be forwarded to me.)
    - - -
    If my answer has helped you, please sign in and answer yes to the question
    "Did this post answer your question?" at the bottom of the message, which
    adds your question and the answers to the database of answers. Remember that
    questions answered the quickest are often from those who have a history of
    rewarding the contributors who have taken the time to answer questions
    correctly.


    "'69 Camaro" wrote:

    > > could you help me to fx this

    >
    > Sure. You have illegal characters in the name of the query. Spaces aren't
    > allowed. However, Jet often lets one "fix" these illegal characters if one
    > puts brackets around a multiple-worded name. For example:
    >
    > rpt.RecordSource = "SELECT * " & _
    > "FROM [Orders Query Invoice] " & _
    > "WHERE (OrderID = " & Me!txtOrderID.Value & ");"
    >
    > There's no guarantee that illegal characters that are bracketed will work in
    > every situation. Only use alphanumeric characters and the underscore
    > character when naming any object (that includes tables and fields),
    > procedure, or variable, and you will avoid many, many bugs.
    >
    > HTH.
    > Gunny
    >
    > See http://www.QBuilt.com for all your database needs.
    > See http://www.Access.QBuilt.com for Microsoft Access tips.
    >
    > (Please remove ZERO_SPAM from my reply E-mail address so that a message will
    > be forwarded to me.)
    > - - -
    > If my answer has helped you, please sign in and answer yes to the question
    > "Did this post answer your question?" at the bottom of the message, which
    > adds your question and the answers to the database of answers. Remember that
    > questions answered the quickest are often from those who have a history of
    > rewarding the contributors who have taken the time to answer questions
    > correctly.
    >
    >
    > "ldiaz" wrote:
    >
    > > Hi camaro...I used your code but appear an error message that says:
    > >
    > > Error #3131
    > > Syntax error in FROM clause
    > >
    > > my query name is:Orders Query Invoice
    > > my form Name is "Orders" where I put the button
    > > my primary key is OrderID and it has the same name of text box.
    > >
    > > could you help me to fx this, I'm sure it work but I have a little problem.
    > >
    > > Thanks for your help..
    > >
    > > Ldiaz
    > >
    > >
    > > "'69 Camaro" wrote:
    > >
    > > > Make a copy of your "Orders" report and name this copy "rptSingleOrder"
    > > > because you are going to be making modifications to it programmatically, and
    > > > you'll probably want to keep the original. Next, look at the
    > > > rptSingleOrder's Record Source Property to find the query or table that's
    > > > used as the record source. In the example below, I've used qryOrders, but
    > > > you'll need to replace this name with your report's Record Source Property.
    > > > Next, create a button on your Orders form and paste the following code in the
    > > > form's module:
    > > >
    > > > Private Sub EMailRptBtn_Click()
    > > >
    > > > On Error GoTo ErrHandler
    > > >
    > > > Dim rpt As Report
    > > > Dim sRptName As String
    > > > Dim sMsg As String
    > > > Dim stdomail As String
    > > >
    > > > sRptName = "rptSingleOrder"
    > > > sMsg = "Please confirm if this Order Quotation is correct with " & _
    > > > "Product Name, Descripción & price!!"
    > > > stdomail = Me![SupplierID].Column(2) 'This column has the e-mail address
    > > >
    > > > DoCmd.OpenReport sRptName, acViewDesign
    > > > Set rpt = Reports(sRptName)
    > > > rpt.RecordSource = "SELECT * " & _
    > > > "FROM qryOrders " & _
    > > > "WHERE (OrderID = " & Me!txtOrderID.Value & ");"
    > > > DoCmd.Close acReport, sRptName, acSaveYes
    > > >
    > > > DoCmd.SendObject acSendReport, sRptName, acFormatSNP, _
    > > > stdomail, , , "Order Quotation", sMsg, False
    > > >
    > > > CleanUp:
    > > >
    > > > Set rpt = Nothing
    > > >
    > > > Exit Sub
    > > >
    > > > ErrHandler:
    > > >
    > > > If (Err.Number <> 2501) Then ' User didn't cancel E-Mail.
    > > > MsgBox "Error in EMailRptBtn_Click( ) in" & vbCrLf & _
    > > > Me.Name & " form." & vbCrLf & vbCrLf & _
    > > > "Error #" & Err.Number & vbCrLf & vbCrLf & Err.Description
    > > > End If
    > > >
    > > > Err.Clear
    > > > GoTo CleanUp
    > > >
    > > > End Sub ' EMailRptBtn_Click( )
    > > >
    > > > . . . where EMailRptBtn is the name of the button, rptSingleOrder is the
    > > > name of the report that gets modified and sent as a snapshot to the
    > > > recipient, SupplierID is the combo box that holds the E-Mail address,
    > > > qryOrders is the data source for the orders, OrderID is the primary key for
    > > > the data source, and txtOrderID is the text box that displays the OrderID.
    > > >
    > > > Save and compile the code, then return to the form and open it in Form View.
    > > > Select the record to send the report to the recipient on the form, then
    > > > select the EMailRptBtn to send it off without editing it. If you want to
    > > > edit the E-mail before sending it, then change the last argument in the
    > > > SendObject method to TRUE. If you want a different format than the snapshot
    > > > format, then change acFormatSNP to a different format.
    > > >
    > > > And remember that SendObject can be buggy, especially when used in loops.
    > > >
    > > > HTH.
    > > > Gunny
    > > >
    > > > See http://www.QBuilt.com for all your database needs.
    > > > See http://www.Access.QBuilt.com for Microsoft Access tips.
    > > >
    > > > (Please remove ZERO_SPAM from my reply E-mail address so that a message will
    > > > be forwarded to me.)
    > > > - - -
    > > > If my answer has helped you, please sign in and answer yes to the question
    > > > "Did this post answer your question?" at the bottom of the message, which
    > > > adds your question and the answers to the database of answers. Remember that
    > > > questions answered the quickest are often from those who have a history of
    > > > rewarding the contributors who have taken the time to answer questions
    > > > correctly.
    > > >
    > > >
    > > > "ldiaz" wrote:
    > > >
    > > > > Hi all..
    > > > > I want to send a report but this function pull all Orders reports and I want
    > > > > just one accordings the Orders Form is opened,
    > > > > I have something similary in the Print Function to print the same report,
    > > > > but with this I don't have the problem because it's filtered by a Query with
    > > > > criteria, but to send individual Orders reports , I don't know how? Could
    > > > > anybody help me on this please.
    > > > >
    > > > > Thanks.
    > > > > Ldiaz
    > > > >
    > > > >
    > > > > """"here is the code that I have....
    > > > > ____________________________________________________________
    > > > > Private Sub mail_Click()
    > > > > On Error GoTo Err_mail_Click
    > > > >
    > > > > Dim stDocName As String
    > > > > Dim stdomail As String
    > > > >
    > > > >
    > > > > stDocName = "Orders" 'Report name
    > > > > stdomail = Me![SupplierID].Column(2) 'This column has the e-mail address
    > > > > DoCmd.SendObject acReport, stDocName, , stdomail, , , "Order Quotation",
    > > > > "Please confirm if this Order Quotation is correct with Product
    > > > > Name,Descripción & price!!"
    > > > >
    > > > >
    > > > > Exit_mail_Click:
    > > > > Exit Sub
    > > > >
    > > > > Err_mail_Click:
    > > > > MsgBox Err.Description
    > > > > Resume Exit_mail_Click
    > > > >
    > > > > End Sub
    > > > > _______________________________________________________
    > > > >
    > > > >
    > > > >
     
  8. ldiaz

    ldiaz
    Expand Collapse
    Guest

    Thank you so much camaro for your help, I found that my problem was because I
    had OrderID in the form and OrderId in the Subform, I have remove OrderID
    from subform and it's working fine righ now..

    anyway I want to thank you all your attention to my question.

    Best Regards and God bless you.

    Thanks.
    ldiaz@safariland.com



    "'69 Camaro" wrote:

    > Oops. You mentioned "has the same name of text box" and I mistranslated that
    > to mean the same name as I had given the text box, not the text box with the
    > same name as your primary key. Try:
    >
    > rpt.RecordSource = "SELECT * " & _
    > "FROM [Orders Query Invoice] " & _
    > "WHERE (OrderID = " & Me!OrderID.Value & ");"
    >
    > Sorry for any confusion. And if you want to avoid bugs in the future, don't
    > accept the default names that Access gives for the controls that are going to
    > be referenced either in VBA code, as shown above, or as a property. Rename
    > these controls to something like txtOrderID, which indicates it's a text box
    > displaying the OrderID field.
    >
    > HTH.
    > Gunny
    >
    > See http://www.QBuilt.com for all your database needs.
    > See http://www.Access.QBuilt.com for Microsoft Access tips.
    >
    > (Please remove ZERO_SPAM from my reply E-mail address so that a message will
    > be forwarded to me.)
    > - - -
    > If my answer has helped you, please sign in and answer yes to the question
    > "Did this post answer your question?" at the bottom of the message, which
    > adds your question and the answers to the database of answers. Remember that
    > questions answered the quickest are often from those who have a history of
    > rewarding the contributors who have taken the time to answer questions
    > correctly.
    >
    >
    > "'69 Camaro" wrote:
    >
    > > > could you help me to fx this

    > >
    > > Sure. You have illegal characters in the name of the query. Spaces aren't
    > > allowed. However, Jet often lets one "fix" these illegal characters if one
    > > puts brackets around a multiple-worded name. For example:
    > >
    > > rpt.RecordSource = "SELECT * " & _
    > > "FROM [Orders Query Invoice] " & _
    > > "WHERE (OrderID = " & Me!txtOrderID.Value & ");"
    > >
    > > There's no guarantee that illegal characters that are bracketed will work in
    > > every situation. Only use alphanumeric characters and the underscore
    > > character when naming any object (that includes tables and fields),
    > > procedure, or variable, and you will avoid many, many bugs.
    > >
    > > HTH.
    > > Gunny
    > >
    > > See http://www.QBuilt.com for all your database needs.
    > > See http://www.Access.QBuilt.com for Microsoft Access tips.
    > >
    > > (Please remove ZERO_SPAM from my reply E-mail address so that a message will
    > > be forwarded to me.)
    > > - - -
    > > If my answer has helped you, please sign in and answer yes to the question
    > > "Did this post answer your question?" at the bottom of the message, which
    > > adds your question and the answers to the database of answers. Remember that
    > > questions answered the quickest are often from those who have a history of
    > > rewarding the contributors who have taken the time to answer questions
    > > correctly.
    > >
    > >
    > > "ldiaz" wrote:
    > >
    > > > Hi camaro...I used your code but appear an error message that says:
    > > >
    > > > Error #3131
    > > > Syntax error in FROM clause
    > > >
    > > > my query name is:Orders Query Invoice
    > > > my form Name is "Orders" where I put the button
    > > > my primary key is OrderID and it has the same name of text box.
    > > >
    > > > could you help me to fx this, I'm sure it work but I have a little problem.
    > > >
    > > > Thanks for your help..
    > > >
    > > > Ldiaz
    > > >
    > > >
    > > > "'69 Camaro" wrote:
    > > >
    > > > > Make a copy of your "Orders" report and name this copy "rptSingleOrder"
    > > > > because you are going to be making modifications to it programmatically, and
    > > > > you'll probably want to keep the original. Next, look at the
    > > > > rptSingleOrder's Record Source Property to find the query or table that's
    > > > > used as the record source. In the example below, I've used qryOrders, but
    > > > > you'll need to replace this name with your report's Record Source Property.
    > > > > Next, create a button on your Orders form and paste the following code in the
    > > > > form's module:
    > > > >
    > > > > Private Sub EMailRptBtn_Click()
    > > > >
    > > > > On Error GoTo ErrHandler
    > > > >
    > > > > Dim rpt As Report
    > > > > Dim sRptName As String
    > > > > Dim sMsg As String
    > > > > Dim stdomail As String
    > > > >
    > > > > sRptName = "rptSingleOrder"
    > > > > sMsg = "Please confirm if this Order Quotation is correct with " & _
    > > > > "Product Name, Descripción & price!!"
    > > > > stdomail = Me![SupplierID].Column(2) 'This column has the e-mail address
    > > > >
    > > > > DoCmd.OpenReport sRptName, acViewDesign
    > > > > Set rpt = Reports(sRptName)
    > > > > rpt.RecordSource = "SELECT * " & _
    > > > > "FROM qryOrders " & _
    > > > > "WHERE (OrderID = " & Me!txtOrderID.Value & ");"
    > > > > DoCmd.Close acReport, sRptName, acSaveYes
    > > > >
    > > > > DoCmd.SendObject acSendReport, sRptName, acFormatSNP, _
    > > > > stdomail, , , "Order Quotation", sMsg, False
    > > > >
    > > > > CleanUp:
    > > > >
    > > > > Set rpt = Nothing
    > > > >
    > > > > Exit Sub
    > > > >
    > > > > ErrHandler:
    > > > >
    > > > > If (Err.Number <> 2501) Then ' User didn't cancel E-Mail.
    > > > > MsgBox "Error in EMailRptBtn_Click( ) in" & vbCrLf & _
    > > > > Me.Name & " form." & vbCrLf & vbCrLf & _
    > > > > "Error #" & Err.Number & vbCrLf & vbCrLf & Err.Description
    > > > > End If
    > > > >
    > > > > Err.Clear
    > > > > GoTo CleanUp
    > > > >
    > > > > End Sub ' EMailRptBtn_Click( )
    > > > >
    > > > > . . . where EMailRptBtn is the name of the button, rptSingleOrder is the
    > > > > name of the report that gets modified and sent as a snapshot to the
    > > > > recipient, SupplierID is the combo box that holds the E-Mail address,
    > > > > qryOrders is the data source for the orders, OrderID is the primary key for
    > > > > the data source, and txtOrderID is the text box that displays the OrderID.
    > > > >
    > > > > Save and compile the code, then return to the form and open it in Form View.
    > > > > Select the record to send the report to the recipient on the form, then
    > > > > select the EMailRptBtn to send it off without editing it. If you want to
    > > > > edit the E-mail before sending it, then change the last argument in the
    > > > > SendObject method to TRUE. If you want a different format than the snapshot
    > > > > format, then change acFormatSNP to a different format.
    > > > >
    > > > > And remember that SendObject can be buggy, especially when used in loops.
    > > > >
    > > > > HTH.
    > > > > Gunny
    > > > >
    > > > > See http://www.QBuilt.com for all your database needs.
    > > > > See http://www.Access.QBuilt.com for Microsoft Access tips.
    > > > >
    > > > > (Please remove ZERO_SPAM from my reply E-mail address so that a message will
    > > > > be forwarded to me.)
    > > > > - - -
    > > > > If my answer has helped you, please sign in and answer yes to the question
    > > > > "Did this post answer your question?" at the bottom of the message, which
    > > > > adds your question and the answers to the database of answers. Remember that
    > > > > questions answered the quickest are often from those who have a history of
    > > > > rewarding the contributors who have taken the time to answer questions
    > > > > correctly.
    > > > >
    > > > >
    > > > > "ldiaz" wrote:
    > > > >
    > > > > > Hi all..
    > > > > > I want to send a report but this function pull all Orders reports and I want
    > > > > > just one accordings the Orders Form is opened,
    > > > > > I have something similary in the Print Function to print the same report,
    > > > > > but with this I don't have the problem because it's filtered by a Query with
    > > > > > criteria, but to send individual Orders reports , I don't know how? Could
    > > > > > anybody help me on this please.
    > > > > >
    > > > > > Thanks.
    > > > > > Ldiaz
    > > > > >
    > > > > >
    > > > > > """"here is the code that I have....
    > > > > > ____________________________________________________________
    > > > > > Private Sub mail_Click()
    > > > > > On Error GoTo Err_mail_Click
    > > > > >
    > > > > > Dim stDocName As String
    > > > > > Dim stdomail As String
    > > > > >
    > > > > >
    > > > > > stDocName = "Orders" 'Report name
    > > > > > stdomail = Me![SupplierID].Column(2) 'This column has the e-mail address
    > > > > > DoCmd.SendObject acReport, stDocName, , stdomail, , , "Order Quotation",
    > > > > > "Please confirm if this Order Quotation is correct with Product
    > > > > > Name,Descripción & price!!"
    > > > > >
    > > > > >
    > > > > > Exit_mail_Click:
    > > > > > Exit Sub
    > > > > >
    > > > > > Err_mail_Click:
    > > > > > MsgBox Err.Description
    > > > > > Resume Exit_mail_Click
    > > > > >
    > > > > > End Sub
    > > > > > _______________________________________________________
    > > > > >
    > > > > >
    > > > > >
     
  9. '69 Camaro

    '69 Camaro
    Expand Collapse
    Guest

    You're very welcome. It appears that you've marked my post above as an
    answer to your question. Unfortunately, the Web portal is still rather
    buggy and it didn't recognize you as the original poster of the question.
    Would you please do me a favor and sign in again to the Microsoft Online
    Community with your .Net Passport and try to mark the "Did this post answer
    your question?" question on my previous post until a green check mark shows
    up? (Refresh the page about a minute later and the green check mark should
    appear.)

    Thanks! It's greatly appreciated.
    Gunny

    See http://www.QBuilt.com for all your database needs.
    See http://www.Access.QBuilt.com for Microsoft Access tips.


    "ldiaz" <ldiaz@discussions.microsoft.com> wrote in message
    news:FBC994CB-70E6-4721-A0F6-91C60F4129B7@microsoft.com...
    > Thank you so much camaro for your help, I found that my problem was
    > because I
    > had OrderID in the form and OrderId in the Subform, I have remove OrderID
    > from subform and it's working fine righ now..
    >
    > anyway I want to thank you all your attention to my question.
    >
    > Best Regards and God bless you.
    >
    > Thanks.
    > ldiaz@safariland.com
    >
    >
    >
    > "'69 Camaro" wrote:
    >
    >> Oops. You mentioned "has the same name of text box" and I mistranslated
    >> that
    >> to mean the same name as I had given the text box, not the text box with
    >> the
    >> same name as your primary key. Try:
    >>
    >> rpt.RecordSource = "SELECT * " & _
    >> "FROM [Orders Query Invoice] " & _
    >> "WHERE (OrderID = " & Me!OrderID.Value & ");"
    >>
    >> Sorry for any confusion. And if you want to avoid bugs in the future,
    >> don't
    >> accept the default names that Access gives for the controls that are
    >> going to
    >> be referenced either in VBA code, as shown above, or as a property.
    >> Rename
    >> these controls to something like txtOrderID, which indicates it's a text
    >> box
    >> displaying the OrderID field.
    >>
    >> HTH.
    >> Gunny
    >>
    >> See http://www.QBuilt.com for all your database needs.
    >> See http://www.Access.QBuilt.com for Microsoft Access tips.
    >>
    >> (Please remove ZERO_SPAM from my reply E-mail address so that a message
    >> will
    >> be forwarded to me.)
    >> - - -
    >> If my answer has helped you, please sign in and answer yes to the
    >> question
    >> "Did this post answer your question?" at the bottom of the message, which
    >> adds your question and the answers to the database of answers. Remember
    >> that
    >> questions answered the quickest are often from those who have a history
    >> of
    >> rewarding the contributors who have taken the time to answer questions
    >> correctly.
    >>
    >>
    >> "'69 Camaro" wrote:
    >>
    >> > > could you help me to fx this
    >> >
    >> > Sure. You have illegal characters in the name of the query. Spaces
    >> > aren't
    >> > allowed. However, Jet often lets one "fix" these illegal characters if
    >> > one
    >> > puts brackets around a multiple-worded name. For example:
    >> >
    >> > rpt.RecordSource = "SELECT * " & _
    >> > "FROM [Orders Query Invoice] " & _
    >> > "WHERE (OrderID = " & Me!txtOrderID.Value & ");"
    >> >
    >> > There's no guarantee that illegal characters that are bracketed will
    >> > work in
    >> > every situation. Only use alphanumeric characters and the underscore
    >> > character when naming any object (that includes tables and fields),
    >> > procedure, or variable, and you will avoid many, many bugs.
    >> >
    >> > HTH.
    >> > Gunny
    >> >
    >> > See http://www.QBuilt.com for all your database needs.
    >> > See http://www.Access.QBuilt.com for Microsoft Access tips.
    >> >
    >> > (Please remove ZERO_SPAM from my reply E-mail address so that a message
    >> > will
    >> > be forwarded to me.)
    >> > - - -
    >> > If my answer has helped you, please sign in and answer yes to the
    >> > question
    >> > "Did this post answer your question?" at the bottom of the message,
    >> > which
    >> > adds your question and the answers to the database of answers.
    >> > Remember that
    >> > questions answered the quickest are often from those who have a history
    >> > of
    >> > rewarding the contributors who have taken the time to answer questions
    >> > correctly.
    >> >
    >> >
    >> > "ldiaz" wrote:
    >> >
    >> > > Hi camaro...I used your code but appear an error message that says:
    >> > >
    >> > > Error #3131
    >> > > Syntax error in FROM clause
    >> > >
    >> > > my query name is:Orders Query Invoice
    >> > > my form Name is "Orders" where I put the button
    >> > > my primary key is OrderID and it has the same name of text box.
    >> > >
    >> > > could you help me to fx this, I'm sure it work but I have a little
    >> > > problem.
    >> > >
    >> > > Thanks for your help..
    >> > >
    >> > > Ldiaz
    >> > >
    >> > >
    >> > > "'69 Camaro" wrote:
    >> > >
    >> > > > Make a copy of your "Orders" report and name this copy
    >> > > > "rptSingleOrder"
    >> > > > because you are going to be making modifications to it
    >> > > > programmatically, and
    >> > > > you'll probably want to keep the original. Next, look at the
    >> > > > rptSingleOrder's Record Source Property to find the query or table
    >> > > > that's
    >> > > > used as the record source. In the example below, I've used
    >> > > > qryOrders, but
    >> > > > you'll need to replace this name with your report's Record Source
    >> > > > Property.
    >> > > > Next, create a button on your Orders form and paste the following
    >> > > > code in the
    >> > > > form's module:
    >> > > >
    >> > > > Private Sub EMailRptBtn_Click()
    >> > > >
    >> > > > On Error GoTo ErrHandler
    >> > > >
    >> > > > Dim rpt As Report
    >> > > > Dim sRptName As String
    >> > > > Dim sMsg As String
    >> > > > Dim stdomail As String
    >> > > >
    >> > > > sRptName = "rptSingleOrder"
    >> > > > sMsg = "Please confirm if this Order Quotation is correct with
    >> > > > " & _
    >> > > > "Product Name, Descripción & price!!"
    >> > > > stdomail = Me![SupplierID].Column(2) 'This column has the
    >> > > > e-mail address
    >> > > >
    >> > > > DoCmd.OpenReport sRptName, acViewDesign
    >> > > > Set rpt = Reports(sRptName)
    >> > > > rpt.RecordSource = "SELECT * " & _
    >> > > > "FROM qryOrders " & _
    >> > > > "WHERE (OrderID = " & Me!txtOrderID.Value & ");"
    >> > > > DoCmd.Close acReport, sRptName, acSaveYes
    >> > > >
    >> > > > DoCmd.SendObject acSendReport, sRptName, acFormatSNP, _
    >> > > > stdomail, , , "Order Quotation", sMsg, False
    >> > > >
    >> > > > CleanUp:
    >> > > >
    >> > > > Set rpt = Nothing
    >> > > >
    >> > > > Exit Sub
    >> > > >
    >> > > > ErrHandler:
    >> > > >
    >> > > > If (Err.Number <> 2501) Then ' User didn't cancel
    >> > > > E-Mail.
    >> > > > MsgBox "Error in EMailRptBtn_Click( ) in" & vbCrLf & _
    >> > > > Me.Name & " form." & vbCrLf & vbCrLf & _
    >> > > > "Error #" & Err.Number & vbCrLf & vbCrLf &
    >> > > > Err.Description
    >> > > > End If
    >> > > >
    >> > > > Err.Clear
    >> > > > GoTo CleanUp
    >> > > >
    >> > > > End Sub ' EMailRptBtn_Click( )
    >> > > >
    >> > > > . . . where EMailRptBtn is the name of the button, rptSingleOrder
    >> > > > is the
    >> > > > name of the report that gets modified and sent as a snapshot to the
    >> > > > recipient, SupplierID is the combo box that holds the E-Mail
    >> > > > address,
    >> > > > qryOrders is the data source for the orders, OrderID is the primary
    >> > > > key for
    >> > > > the data source, and txtOrderID is the text box that displays the
    >> > > > OrderID.
    >> > > >
    >> > > > Save and compile the code, then return to the form and open it in
    >> > > > Form View.
    >> > > > Select the record to send the report to the recipient on the form,
    >> > > > then
    >> > > > select the EMailRptBtn to send it off without editing it. If you
    >> > > > want to
    >> > > > edit the E-mail before sending it, then change the last argument in
    >> > > > the
    >> > > > SendObject method to TRUE. If you want a different format than the
    >> > > > snapshot
    >> > > > format, then change acFormatSNP to a different format.
    >> > > >
    >> > > > And remember that SendObject can be buggy, especially when used in
    >> > > > loops.
    >> > > >
    >> > > > HTH.
    >> > > > Gunny
    >> > > >
    >> > > > See http://www.QBuilt.com for all your database needs.
    >> > > > See http://www.Access.QBuilt.com for Microsoft Access tips.
    >> > > >
    >> > > > (Please remove ZERO_SPAM from my reply E-mail address so that a
    >> > > > message will
    >> > > > be forwarded to me.)
    >> > > > - - -
    >> > > > If my answer has helped you, please sign in and answer yes to the
    >> > > > question
    >> > > > "Did this post answer your question?" at the bottom of the message,
    >> > > > which
    >> > > > adds your question and the answers to the database of answers.
    >> > > > Remember that
    >> > > > questions answered the quickest are often from those who have a
    >> > > > history of
    >> > > > rewarding the contributors who have taken the time to answer
    >> > > > questions
    >> > > > correctly.
    >> > > >
    >> > > >
    >> > > > "ldiaz" wrote:
    >> > > >
    >> > > > > Hi all..
    >> > > > > I want to send a report but this function pull all Orders reports
    >> > > > > and I want
    >> > > > > just one accordings the Orders Form is opened,
    >> > > > > I have something similary in the Print Function to print the same
    >> > > > > report,
    >> > > > > but with this I don't have the problem because it's filtered by a
    >> > > > > Query with
    >> > > > > criteria, but to send individual Orders reports , I don't know
    >> > > > > how? Could
    >> > > > > anybody help me on this please.
    >> > > > >
    >> > > > > Thanks.
    >> > > > > Ldiaz
    >> > > > >
    >> > > > >
    >> > > > > """"here is the code that I have....
    >> > > > > ____________________________________________________________
    >> > > > > Private Sub mail_Click()
    >> > > > > On Error GoTo Err_mail_Click
    >> > > > >
    >> > > > > Dim stDocName As String
    >> > > > > Dim stdomail As String
    >> > > > >
    >> > > > >
    >> > > > > stDocName = "Orders" 'Report name
    >> > > > > stdomail = Me![SupplierID].Column(2) 'This column has the
    >> > > > > e-mail address
    >> > > > > DoCmd.SendObject acReport, stDocName, , stdomail, , , "Order
    >> > > > > Quotation",
    >> > > > > "Please confirm if this Order Quotation is correct with Product
    >> > > > > Name,Descripción & price!!"
    >> > > > >
    >> > > > >
    >> > > > > Exit_mail_Click:
    >> > > > > Exit Sub
    >> > > > >
    >> > > > > Err_mail_Click:
    >> > > > > MsgBox Err.Description
    >> > > > > Resume Exit_mail_Click
    >> > > > >
    >> > > > > End Sub
    >> > > > > _______________________________________________________
    >> > > > >
    >> > > > >
    >> > > > >
     
  10. ldiaz

    ldiaz
    Expand Collapse
    Guest

    Hi Camaro, i found the problem,,
    this question was posted from my work computer and I had signed with
    different user name, and when I wanted put as an answer it does not recognize
    me as the orginal porster,but now these questions are already marked with
    green.

    Thank you again .

    Ldiaz
    "'69 Camaro" wrote:

    > You're very welcome. It appears that you've marked my post above as an
    > answer to your question. Unfortunately, the Web portal is still rather
    > buggy and it didn't recognize you as the original poster of the question.
    > Would you please do me a favor and sign in again to the Microsoft Online
    > Community with your .Net Passport and try to mark the "Did this post answer
    > your question?" question on my previous post until a green check mark shows
    > up? (Refresh the page about a minute later and the green check mark should
    > appear.)
    >
    > Thanks! It's greatly appreciated.
    > Gunny
    >
    > See http://www.QBuilt.com for all your database needs.
    > See http://www.Access.QBuilt.com for Microsoft Access tips.
    >
    >
    > "ldiaz" <ldiaz@discussions.microsoft.com> wrote in message
    > news:FBC994CB-70E6-4721-A0F6-91C60F4129B7@microsoft.com...
    > > Thank you so much camaro for your help, I found that my problem was
    > > because I
    > > had OrderID in the form and OrderId in the Subform, I have remove OrderID
    > > from subform and it's working fine righ now..
    > >
    > > anyway I want to thank you all your attention to my question.
    > >
    > > Best Regards and God bless you.
    > >
    > > Thanks.
    > > ldiaz@safariland.com
    > >
    > >
    > >
    > > "'69 Camaro" wrote:
    > >
    > >> Oops. You mentioned "has the same name of text box" and I mistranslated
    > >> that
    > >> to mean the same name as I had given the text box, not the text box with
    > >> the
    > >> same name as your primary key. Try:
    > >>
    > >> rpt.RecordSource = "SELECT * " & _
    > >> "FROM [Orders Query Invoice] " & _
    > >> "WHERE (OrderID = " & Me!OrderID.Value & ");"
    > >>
    > >> Sorry for any confusion. And if you want to avoid bugs in the future,
    > >> don't
    > >> accept the default names that Access gives for the controls that are
    > >> going to
    > >> be referenced either in VBA code, as shown above, or as a property.
    > >> Rename
    > >> these controls to something like txtOrderID, which indicates it's a text
    > >> box
    > >> displaying the OrderID field.
    > >>
    > >> HTH.
    > >> Gunny
    > >>
    > >> See http://www.QBuilt.com for all your database needs.
    > >> See http://www.Access.QBuilt.com for Microsoft Access tips.
    > >>
    > >> (Please remove ZERO_SPAM from my reply E-mail address so that a message
    > >> will
    > >> be forwarded to me.)
    > >> - - -
    > >> If my answer has helped you, please sign in and answer yes to the
    > >> question
    > >> "Did this post answer your question?" at the bottom of the message, which
    > >> adds your question and the answers to the database of answers. Remember
    > >> that
    > >> questions answered the quickest are often from those who have a history
    > >> of
    > >> rewarding the contributors who have taken the time to answer questions
    > >> correctly.
    > >>
    > >>
    > >> "'69 Camaro" wrote:
    > >>
    > >> > > could you help me to fx this
    > >> >
    > >> > Sure. You have illegal characters in the name of the query. Spaces
    > >> > aren't
    > >> > allowed. However, Jet often lets one "fix" these illegal characters if
    > >> > one
    > >> > puts brackets around a multiple-worded name. For example:
    > >> >
    > >> > rpt.RecordSource = "SELECT * " & _
    > >> > "FROM [Orders Query Invoice] " & _
    > >> > "WHERE (OrderID = " & Me!txtOrderID.Value & ");"
    > >> >
    > >> > There's no guarantee that illegal characters that are bracketed will
    > >> > work in
    > >> > every situation. Only use alphanumeric characters and the underscore
    > >> > character when naming any object (that includes tables and fields),
    > >> > procedure, or variable, and you will avoid many, many bugs.
    > >> >
    > >> > HTH.
    > >> > Gunny
    > >> >
    > >> > See http://www.QBuilt.com for all your database needs.
    > >> > See http://www.Access.QBuilt.com for Microsoft Access tips.
    > >> >
    > >> > (Please remove ZERO_SPAM from my reply E-mail address so that a message
    > >> > will
    > >> > be forwarded to me.)
    > >> > - - -
    > >> > If my answer has helped you, please sign in and answer yes to the
    > >> > question
    > >> > "Did this post answer your question?" at the bottom of the message,
    > >> > which
    > >> > adds your question and the answers to the database of answers.
    > >> > Remember that
    > >> > questions answered the quickest are often from those who have a history
    > >> > of
    > >> > rewarding the contributors who have taken the time to answer questions
    > >> > correctly.
    > >> >
    > >> >
    > >> > "ldiaz" wrote:
    > >> >
    > >> > > Hi camaro...I used your code but appear an error message that says:
    > >> > >
    > >> > > Error #3131
    > >> > > Syntax error in FROM clause
    > >> > >
    > >> > > my query name is:Orders Query Invoice
    > >> > > my form Name is "Orders" where I put the button
    > >> > > my primary key is OrderID and it has the same name of text box.
    > >> > >
    > >> > > could you help me to fx this, I'm sure it work but I have a little
    > >> > > problem.
    > >> > >
    > >> > > Thanks for your help..
    > >> > >
    > >> > > Ldiaz
    > >> > >
    > >> > >
    > >> > > "'69 Camaro" wrote:
    > >> > >
    > >> > > > Make a copy of your "Orders" report and name this copy
    > >> > > > "rptSingleOrder"
    > >> > > > because you are going to be making modifications to it
    > >> > > > programmatically, and
    > >> > > > you'll probably want to keep the original. Next, look at the
    > >> > > > rptSingleOrder's Record Source Property to find the query or table
    > >> > > > that's
    > >> > > > used as the record source. In the example below, I've used
    > >> > > > qryOrders, but
    > >> > > > you'll need to replace this name with your report's Record Source
    > >> > > > Property.
    > >> > > > Next, create a button on your Orders form and paste the following
    > >> > > > code in the
    > >> > > > form's module:
    > >> > > >
    > >> > > > Private Sub EMailRptBtn_Click()
    > >> > > >
    > >> > > > On Error GoTo ErrHandler
    > >> > > >
    > >> > > > Dim rpt As Report
    > >> > > > Dim sRptName As String
    > >> > > > Dim sMsg As String
    > >> > > > Dim stdomail As String
    > >> > > >
    > >> > > > sRptName = "rptSingleOrder"
    > >> > > > sMsg = "Please confirm if this Order Quotation is correct with
    > >> > > > " & _
    > >> > > > "Product Name, Descripción & price!!"
    > >> > > > stdomail = Me![SupplierID].Column(2) 'This column has the
    > >> > > > e-mail address
    > >> > > >
    > >> > > > DoCmd.OpenReport sRptName, acViewDesign
    > >> > > > Set rpt = Reports(sRptName)
    > >> > > > rpt.RecordSource = "SELECT * " & _
    > >> > > > "FROM qryOrders " & _
    > >> > > > "WHERE (OrderID = " & Me!txtOrderID.Value & ");"
    > >> > > > DoCmd.Close acReport, sRptName, acSaveYes
    > >> > > >
    > >> > > > DoCmd.SendObject acSendReport, sRptName, acFormatSNP, _
    > >> > > > stdomail, , , "Order Quotation", sMsg, False
    > >> > > >
    > >> > > > CleanUp:
    > >> > > >
    > >> > > > Set rpt = Nothing
    > >> > > >
    > >> > > > Exit Sub
    > >> > > >
    > >> > > > ErrHandler:
    > >> > > >
    > >> > > > If (Err.Number <> 2501) Then ' User didn't cancel
    > >> > > > E-Mail.
    > >> > > > MsgBox "Error in EMailRptBtn_Click( ) in" & vbCrLf & _
    > >> > > > Me.Name & " form." & vbCrLf & vbCrLf & _
    > >> > > > "Error #" & Err.Number & vbCrLf & vbCrLf &
    > >> > > > Err.Description
    > >> > > > End If
    > >> > > >
    > >> > > > Err.Clear
    > >> > > > GoTo CleanUp
    > >> > > >
    > >> > > > End Sub ' EMailRptBtn_Click( )
    > >> > > >
    > >> > > > . . . where EMailRptBtn is the name of the button, rptSingleOrder
    > >> > > > is the
    > >> > > > name of the report that gets modified and sent as a snapshot to the
    > >> > > > recipient, SupplierID is the combo box that holds the E-Mail
    > >> > > > address,
    > >> > > > qryOrders is the data source for the orders, OrderID is the primary
    > >> > > > key for
    > >> > > > the data source, and txtOrderID is the text box that displays the
    > >> > > > OrderID.
    > >> > > >
    > >> > > > Save and compile the code, then return to the form and open it in
    > >> > > > Form View.
    > >> > > > Select the record to send the report to the recipient on the form,
    > >> > > > then
    > >> > > > select the EMailRptBtn to send it off without editing it. If you
    > >> > > > want to
    > >> > > > edit the E-mail before sending it, then change the last argument in
    > >> > > > the
    > >> > > > SendObject method to TRUE. If you want a different format than the
    > >> > > > snapshot
    > >> > > > format, then change acFormatSNP to a different format.
    > >> > > >
    > >> > > > And remember that SendObject can be buggy, especially when used in
    > >> > > > loops.
    > >> > > >
    > >> > > > HTH.
    > >> > > > Gunny
    > >> > > >
    > >> > > > See http://www.QBuilt.com for all your database needs.
    > >> > > > See http://www.Access.QBuilt.com for Microsoft Access tips.
    > >> > > >
    > >> > > > (Please remove ZERO_SPAM from my reply E-mail address so that a
    > >> > > > message will
    > >> > > > be forwarded to me.)
    > >> > > > - - -
    > >> > > > If my answer has helped you, please sign in and answer yes to the
    > >> > > > question
    > >> > > > "Did this post answer your question?" at the bottom of the message,
    > >> > > > which
    > >> > > > adds your question and the answers to the database of answers.
    > >> > > > Remember that
    > >> > > > questions answered the quickest are often from those who have a
    > >> > > > history of
    > >> > > > rewarding the contributors who have taken the time to answer
    > >> > > > questions
    > >> > > > correctly.
    > >> > > >
    > >> > > >
    > >> > > > "ldiaz" wrote:
    > >> > > >
    > >> > > > > Hi all..
    > >> > > > > I want to send a report but this function pull all Orders reports
    > >> > > > > and I want
    > >> > > > > just one accordings the Orders Form is opened,
    > >> > > > > I have something similary in the Print Function to print the same
    > >> > > > > report,
    > >> > > > > but with this I don't have the problem because it's filtered by a
    > >> > > > > Query with
    > >> > > > > criteria, but to send individual Orders reports , I don't know
    > >> > > > > how? Could
    > >> > > > > anybody help me on this please.
    > >> > > > >
    > >> > > > > Thanks.
    > >> > > > > Ldiaz
    > >> > > > >
    > >> > > > >
    > >> > > > > """"here is the code that I have....
    > >> > > > > ____________________________________________________________
    > >> > > > > Private Sub mail_Click()
    > >> > > > > On Error GoTo Err_mail_Click
    > >> > > > >
    > >> > > > > Dim stDocName As String
    > >> > > > > Dim stdomail As String
    > >> > > > >
    > >> > > > >
    > >> > > > > stDocName = "Orders" 'Report name
    > >> > > > > stdomail = Me![SupplierID].Column(2) 'This column has the
    > >> > > > > e-mail address
    > >> > > > > DoCmd.SendObject acReport, stDocName, , stdomail, , , "Order
    > >> > > > > Quotation",
    > >> > > > > "Please confirm if this Order Quotation is correct with Product
    > >> > > > > Name,Descripción & price!!"
    > >> > > > >
    > >> > > > >
    > >> > > > > Exit_mail_Click:
    > >> > > > > Exit Sub
    > >> > > > >
    > >> > > > > Err_mail_Click:
    > >> > > > > MsgBox Err.Description
    > >> > > > > Resume Exit_mail_Click
    > >> > > > >
    > >> > > > > End Sub
    > >> > > > > _______________________________________________________
    > >> > > > >
    > >> > > > >
    > >> > > > >

    >
    >
    >
     
  11. '69 Camaro

    '69 Camaro
    Expand Collapse
    Guest

    Ah. That explains it. Most of the time when this happens, either the
    three-hour time limit has expired when the original poster comes back to
    mark an answer, or he's signed in from another Web site, such as MSN.com,
    and navigated to the Microsoft Online Community and marks the answer. In
    either case, the green check mark won't appear and the contributor won't get
    credit, because he's not recognized by the Web Portal as the original poster
    of the question.

    In any case, thank you very much for marking it again!

    Gunny

    See http://www.QBuilt.com for all your database needs.
    See http://www.Access.QBuilt.com for Microsoft Access tips.


    "ldiaz" <ldiaz@discussions.microsoft.com> wrote in message
    news:55BCFD12-8074-4C41-953A-60112988DBB8@microsoft.com...
    > Hi Camaro, i found the problem,,
    > this question was posted from my work computer and I had signed with
    > different user name, and when I wanted put as an answer it does not
    > recognize
    > me as the orginal porster,but now these questions are already marked with
    > green.
    >
    > Thank you again .
    >
    > Ldiaz
    > "'69 Camaro" wrote:
    >
    >> You're very welcome. It appears that you've marked my post above as an
    >> answer to your question. Unfortunately, the Web portal is still rather
    >> buggy and it didn't recognize you as the original poster of the question.
    >> Would you please do me a favor and sign in again to the Microsoft Online
    >> Community with your .Net Passport and try to mark the "Did this post
    >> answer
    >> your question?" question on my previous post until a green check mark
    >> shows
    >> up? (Refresh the page about a minute later and the green check mark
    >> should
    >> appear.)
    >>
    >> Thanks! It's greatly appreciated.
    >> Gunny
    >>
    >> See http://www.QBuilt.com for all your database needs.
    >> See http://www.Access.QBuilt.com for Microsoft Access tips.
    >>
    >>
    >> "ldiaz" <ldiaz@discussions.microsoft.com> wrote in message
    >> news:FBC994CB-70E6-4721-A0F6-91C60F4129B7@microsoft.com...
    >> > Thank you so much camaro for your help, I found that my problem was
    >> > because I
    >> > had OrderID in the form and OrderId in the Subform, I have remove
    >> > OrderID
    >> > from subform and it's working fine righ now..
    >> >
    >> > anyway I want to thank you all your attention to my question.
    >> >
    >> > Best Regards and God bless you.
    >> >
    >> > Thanks.
    >> > ldiaz@safariland.com
    >> >
    >> >
    >> >
    >> > "'69 Camaro" wrote:
    >> >
    >> >> Oops. You mentioned "has the same name of text box" and I
    >> >> mistranslated
    >> >> that
    >> >> to mean the same name as I had given the text box, not the text box
    >> >> with
    >> >> the
    >> >> same name as your primary key. Try:
    >> >>
    >> >> rpt.RecordSource = "SELECT * " & _
    >> >> "FROM [Orders Query Invoice] " & _
    >> >> "WHERE (OrderID = " & Me!OrderID.Value & ");"
    >> >>
    >> >> Sorry for any confusion. And if you want to avoid bugs in the future,
    >> >> don't
    >> >> accept the default names that Access gives for the controls that are
    >> >> going to
    >> >> be referenced either in VBA code, as shown above, or as a property.
    >> >> Rename
    >> >> these controls to something like txtOrderID, which indicates it's a
    >> >> text
    >> >> box
    >> >> displaying the OrderID field.
    >> >>
    >> >> HTH.
    >> >> Gunny
    >> >>
    >> >> See http://www.QBuilt.com for all your database needs.
    >> >> See http://www.Access.QBuilt.com for Microsoft Access tips.
    >> >>
    >> >> (Please remove ZERO_SPAM from my reply E-mail address so that a
    >> >> message
    >> >> will
    >> >> be forwarded to me.)
    >> >> - - -
    >> >> If my answer has helped you, please sign in and answer yes to the
    >> >> question
    >> >> "Did this post answer your question?" at the bottom of the message,
    >> >> which
    >> >> adds your question and the answers to the database of answers.
    >> >> Remember
    >> >> that
    >> >> questions answered the quickest are often from those who have a
    >> >> history
    >> >> of
    >> >> rewarding the contributors who have taken the time to answer questions
    >> >> correctly.
    >> >>
    >> >>
    >> >> "'69 Camaro" wrote:
    >> >>
    >> >> > > could you help me to fx this
    >> >> >
    >> >> > Sure. You have illegal characters in the name of the query. Spaces
    >> >> > aren't
    >> >> > allowed. However, Jet often lets one "fix" these illegal characters
    >> >> > if
    >> >> > one
    >> >> > puts brackets around a multiple-worded name. For example:
    >> >> >
    >> >> > rpt.RecordSource = "SELECT * " & _
    >> >> > "FROM [Orders Query Invoice] " & _
    >> >> > "WHERE (OrderID = " & Me!txtOrderID.Value & ");"
    >> >> >
    >> >> > There's no guarantee that illegal characters that are bracketed will
    >> >> > work in
    >> >> > every situation. Only use alphanumeric characters and the
    >> >> > underscore
    >> >> > character when naming any object (that includes tables and fields),
    >> >> > procedure, or variable, and you will avoid many, many bugs.
    >> >> >
    >> >> > HTH.
    >> >> > Gunny
    >> >> >
    >> >> > See http://www.QBuilt.com for all your database needs.
    >> >> > See http://www.Access.QBuilt.com for Microsoft Access tips.
    >> >> >
    >> >> > (Please remove ZERO_SPAM from my reply E-mail address so that a
    >> >> > message
    >> >> > will
    >> >> > be forwarded to me.)
    >> >> > - - -
    >> >> > If my answer has helped you, please sign in and answer yes to the
    >> >> > question
    >> >> > "Did this post answer your question?" at the bottom of the message,
    >> >> > which
    >> >> > adds your question and the answers to the database of answers.
    >> >> > Remember that
    >> >> > questions answered the quickest are often from those who have a
    >> >> > history
    >> >> > of
    >> >> > rewarding the contributors who have taken the time to answer
    >> >> > questions
    >> >> > correctly.
    >> >> >
    >> >> >
    >> >> > "ldiaz" wrote:
    >> >> >
    >> >> > > Hi camaro...I used your code but appear an error message that
    >> >> > > says:
    >> >> > >
    >> >> > > Error #3131
    >> >> > > Syntax error in FROM clause
    >> >> > >
    >> >> > > my query name is:Orders Query Invoice
    >> >> > > my form Name is "Orders" where I put the button
    >> >> > > my primary key is OrderID and it has the same name of text box.
    >> >> > >
    >> >> > > could you help me to fx this, I'm sure it work but I have a little
    >> >> > > problem.
    >> >> > >
    >> >> > > Thanks for your help..
    >> >> > >
    >> >> > > Ldiaz
    >> >> > >
    >> >> > >
    >> >> > > "'69 Camaro" wrote:
    >> >> > >
    >> >> > > > Make a copy of your "Orders" report and name this copy
    >> >> > > > "rptSingleOrder"
    >> >> > > > because you are going to be making modifications to it
    >> >> > > > programmatically, and
    >> >> > > > you'll probably want to keep the original. Next, look at the
    >> >> > > > rptSingleOrder's Record Source Property to find the query or
    >> >> > > > table
    >> >> > > > that's
    >> >> > > > used as the record source. In the example below, I've used
    >> >> > > > qryOrders, but
    >> >> > > > you'll need to replace this name with your report's Record
    >> >> > > > Source
    >> >> > > > Property.
    >> >> > > > Next, create a button on your Orders form and paste the
    >> >> > > > following
    >> >> > > > code in the
    >> >> > > > form's module:
    >> >> > > >
    >> >> > > > Private Sub EMailRptBtn_Click()
    >> >> > > >
    >> >> > > > On Error GoTo ErrHandler
    >> >> > > >
    >> >> > > > Dim rpt As Report
    >> >> > > > Dim sRptName As String
    >> >> > > > Dim sMsg As String
    >> >> > > > Dim stdomail As String
    >> >> > > >
    >> >> > > > sRptName = "rptSingleOrder"
    >> >> > > > sMsg = "Please confirm if this Order Quotation is correct
    >> >> > > > with
    >> >> > > > " & _
    >> >> > > > "Product Name, Descripción & price!!"
    >> >> > > > stdomail = Me![SupplierID].Column(2) 'This column has the
    >> >> > > > e-mail address
    >> >> > > >
    >> >> > > > DoCmd.OpenReport sRptName, acViewDesign
    >> >> > > > Set rpt = Reports(sRptName)
    >> >> > > > rpt.RecordSource = "SELECT * " & _
    >> >> > > > "FROM qryOrders " & _
    >> >> > > > "WHERE (OrderID = " & Me!txtOrderID.Value & ");"
    >> >> > > > DoCmd.Close acReport, sRptName, acSaveYes
    >> >> > > >
    >> >> > > > DoCmd.SendObject acSendReport, sRptName, acFormatSNP, _
    >> >> > > > stdomail, , , "Order Quotation", sMsg, False
    >> >> > > >
    >> >> > > > CleanUp:
    >> >> > > >
    >> >> > > > Set rpt = Nothing
    >> >> > > >
    >> >> > > > Exit Sub
    >> >> > > >
    >> >> > > > ErrHandler:
    >> >> > > >
    >> >> > > > If (Err.Number <> 2501) Then ' User didn't cancel
    >> >> > > > E-Mail.
    >> >> > > > MsgBox "Error in EMailRptBtn_Click( ) in" & vbCrLf & _
    >> >> > > > Me.Name & " form." & vbCrLf & vbCrLf & _
    >> >> > > > "Error #" & Err.Number & vbCrLf & vbCrLf &
    >> >> > > > Err.Description
    >> >> > > > End If
    >> >> > > >
    >> >> > > > Err.Clear
    >> >> > > > GoTo CleanUp
    >> >> > > >
    >> >> > > > End Sub ' EMailRptBtn_Click( )
    >> >> > > >
    >> >> > > > . . . where EMailRptBtn is the name of the button,
    >> >> > > > rptSingleOrder
    >> >> > > > is the
    >> >> > > > name of the report that gets modified and sent as a snapshot to
    >> >> > > > the
    >> >> > > > recipient, SupplierID is the combo box that holds the E-Mail
    >> >> > > > address,
    >> >> > > > qryOrders is the data source for the orders, OrderID is the
    >> >> > > > primary
    >> >> > > > key for
    >> >> > > > the data source, and txtOrderID is the text box that displays
    >> >> > > > the
    >> >> > > > OrderID.
    >> >> > > >
    >> >> > > > Save and compile the code, then return to the form and open it
    >> >> > > > in
    >> >> > > > Form View.
    >> >> > > > Select the record to send the report to the recipient on the
    >> >> > > > form,
    >> >> > > > then
    >> >> > > > select the EMailRptBtn to send it off without editing it. If
    >> >> > > > you
    >> >> > > > want to
    >> >> > > > edit the E-mail before sending it, then change the last argument
    >> >> > > > in
    >> >> > > > the
    >> >> > > > SendObject method to TRUE. If you want a different format than
    >> >> > > > the
    >> >> > > > snapshot
    >> >> > > > format, then change acFormatSNP to a different format.
    >> >> > > >
    >> >> > > > And remember that SendObject can be buggy, especially when used
    >> >> > > > in
    >> >> > > > loops.
    >> >> > > >
    >> >> > > > HTH.
    >> >> > > > Gunny
    >> >> > > >
    >> >> > > > See http://www.QBuilt.com for all your database needs.
    >> >> > > > See http://www.Access.QBuilt.com for Microsoft Access tips.
    >> >> > > >
    >> >> > > > (Please remove ZERO_SPAM from my reply E-mail address so that a
    >> >> > > > message will
    >> >> > > > be forwarded to me.)
    >> >> > > > - - -
    >> >> > > > If my answer has helped you, please sign in and answer yes to
    >> >> > > > the
    >> >> > > > question
    >> >> > > > "Did this post answer your question?" at the bottom of the
    >> >> > > > message,
    >> >> > > > which
    >> >> > > > adds your question and the answers to the database of answers.
    >> >> > > > Remember that
    >> >> > > > questions answered the quickest are often from those who have a
    >> >> > > > history of
    >> >> > > > rewarding the contributors who have taken the time to answer
    >> >> > > > questions
    >> >> > > > correctly.
    >> >> > > >
    >> >> > > >
    >> >> > > > "ldiaz" wrote:
    >> >> > > >
    >> >> > > > > Hi all..
    >> >> > > > > I want to send a report but this function pull all Orders
    >> >> > > > > reports
    >> >> > > > > and I want
    >> >> > > > > just one accordings the Orders Form is opened,
    >> >> > > > > I have something similary in the Print Function to print the
    >> >> > > > > same
    >> >> > > > > report,
    >> >> > > > > but with this I don't have the problem because it's filtered
    >> >> > > > > by a
    >> >> > > > > Query with
    >> >> > > > > criteria, but to send individual Orders reports , I don't know
    >> >> > > > > how? Could
    >> >> > > > > anybody help me on this please.
    >> >> > > > >
    >> >> > > > > Thanks.
    >> >> > > > > Ldiaz
    >> >> > > > >
    >> >> > > > >
    >> >> > > > > """"here is the code that I have....
    >> >> > > > > ____________________________________________________________
    >> >> > > > > Private Sub mail_Click()
    >> >> > > > > On Error GoTo Err_mail_Click
    >> >> > > > >
    >> >> > > > > Dim stDocName As String
    >> >> > > > > Dim stdomail As String
    >> >> > > > >
    >> >> > > > >
    >> >> > > > > stDocName = "Orders" 'Report name
    >> >> > > > > stdomail = Me![SupplierID].Column(2) 'This column has the
    >> >> > > > > e-mail address
    >> >> > > > > DoCmd.SendObject acReport, stDocName, , stdomail, , ,
    >> >> > > > > "Order
    >> >> > > > > Quotation",
    >> >> > > > > "Please confirm if this Order Quotation is correct with
    >> >> > > > > Product
    >> >> > > > > Name,Descripción & price!!"
    >> >> > > > >
    >> >> > > > >
    >> >> > > > > Exit_mail_Click:
    >> >> > > > > Exit Sub
    >> >> > > > >
    >> >> > > > > Err_mail_Click:
    >> >> > > > > MsgBox Err.Description
    >> >> > > > > Resume Exit_mail_Click
    >> >> > > > >
    >> >> > > > > End Sub
    >> >> > > > > _______________________________________________________
    >> >> > > > >
    >> >> > > > >
    >> >> > > > >

    >>
    >>
    >>
     

Share This Page