R
Ross Culver
I have a combobox that I set the list value on when opening a Post form. Using the code below, I can set the list to equal contact fullname, but it errors out when I try to use the contact company field. Why?
Function Item_Open()
dim strUser, I, X, Y
Set myNameSpace = Application.GetNameSpace("MAPI")
set myItem = GetInspector.ModifiedFormPages("Account Checklist")
Set fldAcctMgr = myNameSpace.Folders("Personal Folders").Folders("Contacts")
Set itmAcctMgr = fldAcctMgr.Items
Set fltAcctMgr = itmAcctMgr.restrict("[JobTitle] = 'Account Manager'")
X = fltAcctMgr.Count
Redim amArray(X)
For I = 1 to X
amArray(I) = fltAcctMgr(I).FullName
Next
myItem.cboxAcctMgr.List = amArray
End Function
Thanks,
Ross
Function Item_Open()
dim strUser, I, X, Y
Set myNameSpace = Application.GetNameSpace("MAPI")
set myItem = GetInspector.ModifiedFormPages("Account Checklist")
Set fldAcctMgr = myNameSpace.Folders("Personal Folders").Folders("Contacts")
Set itmAcctMgr = fldAcctMgr.Items
Set fltAcctMgr = itmAcctMgr.restrict("[JobTitle] = 'Account Manager'")
X = fltAcctMgr.Count
Redim amArray(X)
For I = 1 to X
amArray(I) = fltAcctMgr(I).FullName
Next
myItem.cboxAcctMgr.List = amArray
End Function
Thanks,
Ross