Custom Form Forcing Save

C

Cass

On my form I have the following code:

Function Item_Write()

If Item.UserProperties.Find("Utility") <> "" Then
If Item.UserProperties.Find("CityState") <> "" Then

Item.FileAs = Item.UserProperties.Find("Utility") & vbcrlf & _
Item.UserProperties.Find("CityState")

Else
Item.FileAs=Item.UserProperties.Find("Utility")
End If
Else
Item.FileAS=Item.UserProperties.Find("CityState")
End If
End Function


When I try to use the default Contacts button on the custom form it
gives me this "The item must be saved. Would you lilke to save it
now?"

Also, the form is being named "()" in the title bar.

Anybody know why it is doing this?
 
S

Sue Mosher [MVP-Outlook]

When I try to use the default Contacts button on the custom form it
gives me this "The item must be saved. Would you lilke to save it
now?"

This sounds like normal behavior. A contact must be saved before you can link it to other contacts.
Also, the form is being named "()" in the title bar.

Do you have a formula on the FileAs field, in addition to your code?
 
C

Cass

This sounds like normal behavior. A contact must be saved before you can link it to other contacts.


Do you have a formula on the FileAs field, in addition to your code?

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54












- Show quoted text -

No, that code is all there is.
 
S

Sue Mosher [MVP-Outlook]

What are the values of Utility and CityState when that happens? Feel free to put in a MsgBox statement for troubleshooting.

I don't think your code provides a solution for the case where both those properties are blank.
 

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