Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Access Forms Coding > Button to autom...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 41497 of 43413
Post > Topic >>

Button to automatically mail a flitered re****t

by =?Utf-8?B?RGFpc3lk?= <Daisyd@[EMAIL PROTECTED] > Aug 5, 2008 at 05:38 AM

Hello

I'm trying to create a button on a form that when clicked automatically 
mails a re****t.  However, the tricky part is that I want that re****t to
only 
contain the data from the current record.

I am an Access amateur but have fudged together the following code where 
"Bookingref" is the field that identifies the current and "Invoice 
Instruction" is the re****t I want to mail.

Something's not quite working and I'm too much of an idiot to know what it
is.

Private Sub Mail_Re****t_Click()
On Error GoTo Err_Mail_Re****t_Click

Dim stDocName As String
Dim MyWhereCondition As String

    MyWhereCondition = "Bookingref= " & Me.Bookingref
        
    stDocName = "Invoice Instruction"
DoCmd.SendObject acRe****t, stDocName, , MyWhereCondition

Exit_Mail_Re****t_Click:
    Exit Sub

Err_Mail_Re****t_Click:
    MsgBox Err.Description
    Resume Exit_Mail_Re****t_Click
    
End Sub
 




 3 Posts in Topic:
Button to automatically mail a flitered report
=?Utf-8?B?RGFpc3lk?= <  2008-08-05 05:38:00 
Re: Button to automatically mail a flitered report
"Douglas J. Steele&q  2008-08-05 09:23:44 
Re: Button to automatically mail a flitered report
=?Utf-8?B?RGFpc3lk?= <  2008-08-05 07:04:01 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 20:45:49 CST 2008.