Inserting Data From A Database Into A User-Defined Field

R

Rob

I have added a field to a Contact form in Business Contact Manager called
Test Field.

The issue I am having, concerns when I try to insert data from a database
into the field using a piece of VBScript.

My code to insert the content is:

if isnull(objrs("Member Name")) = false then .TestField = objrs("Member
Name")

I am wondering if it is the name of the field I am looking up in the form
(.TestField) and whether or not this is the correct VB name for the field,
Test Field.

If this is the case how do I find out what the VB name is for user-defined
fields?

Any advice would be much appreciated
 
R

Rob

Thanks for that, so including that code, would the line of code read

if isnull(objrs("Member Name")) = false then myContact.UserProperties("Test
Field") = objrs("Member Name")
 
S

Sue Mosher [MVP-Outlook]

I'm not sure that makes sense. If Member Name is Null, why bother getting the value twice, why not just:

If isnull(objrs("Member Name")) = false then
myContact.UserProperties("Test Field") = ""
End If

For readability, I wouldn't do it in one statement.

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

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