L
lywong
I have a form in folder(Project Profile) that haf such a code:
Function Item_Open()
Dim objNameSpace
Dim objProjectProfileFolder
Dim objAllProfiles
Dim objFormPage
Dim objComboClient
Dim objProjectProfile
Set objNameSpace = Application.GetNameSpace("MAPI")
Set objProjectProfileFolder = objNameSpace.Folders("Invoic
Tracking").Folders("Project Profiles")
Set objAllProfiles = objProjectProfileFolder.Items
Set objFormPage = Item.GetInspector.ModifiedFormPages("Billin
Milestone")
Set objComboClient = objFormPage.Controls("cboClient")
For Each objProjectProfile in objAllProfiles
'If-else condition shld be set here
objComboClient.AddItem objProjectProfile.UserProperties("Company")
Next
End Function
How should I put inorder for the cboClient to not repeat same item?
The code now display: 'red, 'blue', 'green','red'
But i only want it to display unqiue items as: 'red, 'blue', 'green'
After the cboClient is selected, it haf to search the matching item an
load the data into cboProject.
I tried something like:
Sub cboClient_Click
'Some code here
msgbox "Here"
End Sub
But it didnt work when I click the cboClient.
Can someone pls enlighten me?
Thanks
Function Item_Open()
Dim objNameSpace
Dim objProjectProfileFolder
Dim objAllProfiles
Dim objFormPage
Dim objComboClient
Dim objProjectProfile
Set objNameSpace = Application.GetNameSpace("MAPI")
Set objProjectProfileFolder = objNameSpace.Folders("Invoic
Tracking").Folders("Project Profiles")
Set objAllProfiles = objProjectProfileFolder.Items
Set objFormPage = Item.GetInspector.ModifiedFormPages("Billin
Milestone")
Set objComboClient = objFormPage.Controls("cboClient")
For Each objProjectProfile in objAllProfiles
'If-else condition shld be set here
objComboClient.AddItem objProjectProfile.UserProperties("Company")
Next
End Function
How should I put inorder for the cboClient to not repeat same item?
The code now display: 'red, 'blue', 'green','red'
But i only want it to display unqiue items as: 'red, 'blue', 'green'
After the cboClient is selected, it haf to search the matching item an
load the data into cboProject.
I tried something like:
Sub cboClient_Click
'Some code here
msgbox "Here"
End Sub
But it didnt work when I click the cboClient.
Can someone pls enlighten me?
Thanks