|
To create an email command button: #Create Table: Table_1 -add field: feild1 #Create Query (qry_email) using feild1 and feild and Table_1 as table. In the Update To: [Forms]!["fORM nAME"]![feild1] In teh Criteria: >0 Or Is Null #Create Report (email_rpt) Record Source should be: qry_email Add feilds that you want to email. #Create Command Button on form: Private Sub Command80_Click() On Error GoTo Err_Command80_Click Dim stDocName As String DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 stDocName = "qry_email" DoCmd.OpenQuery stDocName, acNormal, acEdit stDocName = "email_rpt" DoCmd.SendObject acReport, stDocName, acFormatHTML, "bankformsprp@1stcorbin.com", , , "Employee Information", , False Exit_Command80_Click: Exit Sub Err_Command80_Click: MsgBox Err.Description Resume Exit_Command80_Click End Sub --TO MAKE A NUMBER DEFAULT TO DECIMAIL PLACES FOR CURRENCY --CCur(Left([MyMoney],Len([MyMoney])-2) & "." & Mid([MyMoney],Len([MyMoney])-1,2)) Function ConvertCurrencyToEnglish(ByVal MyNumber) Dim Temp Dim Pounds, Pence Dim DecimalPlace, count ReDim Place(9) As String Place(2) = " Thousand " Place(3) = " Million " Place(4) = " Billion " Place(5) = " Trillion " ' Convert MyNumber to a string, trimming extra spaces.
Approximate Word count = 535 Approximate Pages = 2.1 (250 words per page double spaced)
|
|