Hi,
I have a form in a sub folder called "Project Profiles". It has a coding in the form that goes like this:
Function Item_Open()
Dim objNameSpace
Dim objProjectProfileFolder
Dim objAllProfiles
Dim objFormPage
Dim objComboClient
Dim objProjectProfile
Set objNameSpace = Application.GetNameSpace("MAPI")
Set objProjectProfileFolder = objNameSpace.Folders("Invoice Tracking").Folders("Project Profiles")
Set objAllProfiles = objProjectProfileFolder.Items
Set objFormPage = Item.GetInspector.ModifiedFormPages("Project Profile")
Set objComboClient = objFormPage.Controls("cboCompany")
For Each objProjectProfile in objAllProfiles
objComboClient.AddItem objProjectProfile.cboCompany
Next
End Function
When I run the form, it gives:
Object doesnt support this property or method: "objProjectProfile.cboCompany"
What is wrong with the code??
If I wanted populate the items in combo box from another folder (Invoice Tracking\Billing)in this form, How should I go about doing it? Just change to:
Set objProjectProfileFolder = objNameSpace.Folders("Invoice Tracking").Folders("Billing") ????
Pls advice all Experts! Thanks!
I have a form in a sub folder called "Project Profiles". It has a coding in the form that goes like this:
Function Item_Open()
Dim objNameSpace
Dim objProjectProfileFolder
Dim objAllProfiles
Dim objFormPage
Dim objComboClient
Dim objProjectProfile
Set objNameSpace = Application.GetNameSpace("MAPI")
Set objProjectProfileFolder = objNameSpace.Folders("Invoice Tracking").Folders("Project Profiles")
Set objAllProfiles = objProjectProfileFolder.Items
Set objFormPage = Item.GetInspector.ModifiedFormPages("Project Profile")
Set objComboClient = objFormPage.Controls("cboCompany")
For Each objProjectProfile in objAllProfiles
objComboClient.AddItem objProjectProfile.cboCompany
Next
End Function
When I run the form, it gives:
Object doesnt support this property or method: "objProjectProfile.cboCompany"
What is wrong with the code??
If I wanted populate the items in combo box from another folder (Invoice Tracking\Billing)in this form, How should I go about doing it? Just change to:
Set objProjectProfileFolder = objNameSpace.Folders("Invoice Tracking").Folders("Billing") ????
Pls advice all Experts! Thanks!