Richard Vrooman
October 18th, 2001, 10:35 AM
I am trying to write some contact info from an Access 2000 database into to an Outlook 2000 contact Public folder. I've got the VB code set up in a module within the access database. As part of the process I have the following code:
.Account = snpContacts![Client Number]
.Company = snpContacts![Alias Name]
.FirstName = snpContacts![First Name]
.LastName = snpContacts![Last Name]
'-- Copy the email address field if it was entered in the database, make it blank if not
If IsNull(snpContacts![Phone Number]) Then
.[E-Mail] = ""
Else
.[E-Mail] = snpContacts![Phone Number]
End If
The process bombs with a Run-time error 438: "Object doesn't suppor this property or method" on the lines beginning
.Company =
and
.[E-mail] =
If I comment these lines out then the code runs fine. The Company and E-mail fields are in the list of contact item fields. Why would this error occur particularly with these two items? How do I fix this?
Thanks for your help.
.Account = snpContacts![Client Number]
.Company = snpContacts![Alias Name]
.FirstName = snpContacts![First Name]
.LastName = snpContacts![Last Name]
'-- Copy the email address field if it was entered in the database, make it blank if not
If IsNull(snpContacts![Phone Number]) Then
.[E-Mail] = ""
Else
.[E-Mail] = snpContacts![Phone Number]
End If
The process bombs with a Run-time error 438: "Object doesn't suppor this property or method" on the lines beginning
.Company =
and
.[E-mail] =
If I comment these lines out then the code runs fine. The Company and E-mail fields are in the list of contact item fields. Why would this error occur particularly with these two items? How do I fix this?
Thanks for your help.