Access XP => Outlook XP 
Author Message
 Access XP => Outlook XP

I've created a little program to export all our contacts from Access to
Outlook.  With Outlook we can export the contacts to our Palm.  Is there a
solution to update a record in Outlook when we've changed it in Access?  I
guess with the "Find"-method but i also get errors :-(

This is a snip of the code to export the contacts:

'Export records of Access Table to Outlook contacts
For lngPosition = 1 To lngCount
    With rstFirma
        strContactID = Nz(rstFirma.Fields("IDEN"))
        strCompany = Nz(rstFirma.Fields("FIRM"))
        strBusinessStreet = Nz(rstFirma.Fields("ADR0")) & _
                            IIf(Nz(rstFirma.Fields("ADR1")) <> "", vbCrLf &
_
                            Nz(rstFirma.Fields("ADR2")), "")
        strBusinessCity = Nz(rstFirma.Fields("GEME"))
        strBusinessPostalCode = Nz(rstFirma.Fields("POST"))
        strBusinessCountry = Nz(rstFirma.Fields("LAND"))
    End With

   'Create contact item
   Set itm = itms.Add(strContactForm)

    With itm
        'Standard Contact fields
        .CustomerID = strContactID
        .CompanyName = strCompany
        .BusinessAddressStreet = strBusinessStreet
        .BusinessAddressCity = strBusinessCity
        .BusinessAddressPostalCode = strBusinessPostalCode
        .BusinessAddressCountry = strBusinessCountry

        'Close and save new contact item in Outlook
        DoCmd.RunCommand acCmdSaveRecord
        .Close (olSave)
    End With
    rstFirma.MoveNext
Next lngPosition

Where you see
   'Create contact item
   Set itm = itms.Add(strContactForm)

I've tried to insert:
Set itm = itms.Find("[CustomerID]=strContactID")

But he can't find it :-(
Anyone an idea?

Best regards
Bart
--
Bart Vanwijnsberghe
http://www.*-*-*.com/

ICQ: 49454469



Thu, 20 Jan 2005 00:55:29 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Access xp sending email via outlook xp

2. Access xp sending email via outlook xp

3. Word XP and Access XP

4. Outlook XP <> Access97

5. Outlook 2000 > XP plugin using VB

6. Accessing Outlook calendar from code on XP

7. Outlook XP security Warning when Accessing GLobal Adress book

8. Accessing Outlook calendar from code on XP

9. form of outlook xp to outlook 2000 sp3

10. Changes in the Item.GetInspector.CommandBars from Outlook 2000 to Outlook XP

11. Outlook 2002/Outlook with Office XP

12. VBA in Outlook XP Vs Outlook 2000.

 

 
Powered by phpBB® Forum Software