Access.2007.VBA.Bibl..
con.CallbackTelephoneNumber = _ Nz(rstSource![CallbackTelephoneNumber]) con.CarTelephoneNumber = _ Nz(rstSource![CarTelephoneNum ...
Use special date handling (a blank date in Outlook is actually a date of 1/1/4501): If Nz(rstSource![Birthday]) <> “” Then ...
& “; Description: “ & Err.Description Resume ErrorHandlerExit End If End Sub The UpdateAllAccessContactsprocedure has th ...
On Error Resume Next DoCmd.SetWarnings False DoCmd.OpenQuery “qdelContactIDs” DoCmd.OpenQuery “qdelContactAddresses” DoCmd.OpenQ ...
Create a new contact record in the target table. rstTarget.AddNew rstTarget![CustomerID] = strCustomerID rstTarget![ContactID] = ...
To update data in tblContactAddresses, if there is data in any of the Business address fields, the strAddressType variable is se ...
Update Home address info. If Nz(rstSource!HomeAddressStreet) <> “” _ Or Nz(rstSource!HomeAddressPostOfficeBox) <> “” ...
strSearch = “[ContactID] = “ & lngContactID _ & “ And [AddressType] = “ & Chr$(39) _ & strAddressType & Chr$ ...
Create a new company phone record in the target table. rstTarget.AddNew rstTarget![CompanyID] = lngCompanyID rstTarget![Descript ...
If Nz(rstSource![BusinessFaxNumber]) <> “” Then strDescription = “Business Fax” strSearch = “[ContactID] = “ & lngCont ...
Loop rstTarget.Close strTitle = “Access tables updated” strPrompt = “Linked Access tables of contact data “ _ & “updated fro ...
Working with Attachments................................................................................................ Outlook ...
strFile = _ SplitFileName(rstSourceAttachments.Fields(“FileName”)) Debug.Print “File name: “ & strFile strFileAndPath = strD ...
‘Called from NewAccessContactAndID and ‘ImportOutlookContacts On Error GoTo ErrorHandler Set fso = CreateObject(“Scripting.FileS ...
Public Sub CopyAccessAttsToAccess(rstSourceAttachments _ As DAO.Recordset2, rstTargetAttachments _ As DAO.Recordset2) ‘Called fr ...
Loop rstSourceAttachments.Close rstTargetAttachments.Close ErrorHandlerExit: Exit Sub ErrorHandler: If Err.Number = 3839 Then ‘F ...
FIGURE 11.16 An Outlook contact with an attachment created from an Access contact record. Summary .............................. ...
E arlier chapters in this book described how to work with Word, Excel, and Outlook, using VBA code to create Word documents, Exc ...
The sample Northwind Plus database contains tables from the Northwind.mdb database, with sev- eral extra fields in some tables, ...
Going Beyond the Basics 12 Select the Digital Certificate for VBA projects item: Selecting the Digital Certificate for VBA Pro ...
«
16
17
18
19
20
21
22
23
24
25
»
Free download pdf