Custom Contact Form Problem

P

PeteD

Hi,

I have this code below on one of my custom form. When
this form is used by the user when sending a request,
everything works great. However, when the recipient
replies to this request form, a blank item of this
contact form can be found in the deleted items folder.
Since my form contains 15 phone fields, there are also 15
contact items in the deleted items folder. Is there a way
to modify the code to change the behaviour without
changing the functionality?

TIA
PetD
===============================================
If Name = "txtCompanyPhone" Then
Set objPhoneFld = Item.UserProperties
("txtCompanyPhone")
' Create a temporary contact item.
Set objTempContact = Application.CreateItem
(olContactItem)
' Populate a standard phone field in the temp item
' with the value of the custom phone field.
' This should resolve correctly.
objTempContact.BusinessTelephoneNumber =
objPhoneFld.Value
' Populate the custom phone field with the newly
resolved
' phone number from the standard field.
objPhoneFld.Value =
objTempContact.BusinessTelephoneNumber
' Delete the temporary item.
objTempContact.Delete
End If
 
G

Guest

There's no need to delete the temporary contact, since you've never saved it. Try just setting it to Nothing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top