C
Chris
I have a Public Folder which holds a list of Customers (Contacts)
I've created a custom form based on Appointment. I have an extra tab
called Consultants Activity Recording, and on that tab I also have a
combobox called ComboBox1.
When I click on the combobox, I want it to display a list of all the
companys in my public folder.
I've added the following code to the form, but my combobox is blank.
What have I done wrong? Many Thanks.
Function Item_Open()
Dim oParentFolder
Dim oFolder
Dim oItems
Dim oControl
Dim i
on error Resume next
Set oParentFolder =
Application.ActiveExplorer.CurrentFolder.Parent.Parent
Set oFolder = oParentFolder.Folders("Public
Folders").Folders("Favorites").Folders("Discrete Customers")
Set oItems = oFolder.items
oitems.sort("Company")
set oControl = Item.GetInspector.modifiedFormPages("Consultants
Activity Recording").Controls("ComboBox1")
For i = 1 to oitems.count
oControl.AddItem oitems.item(i).Company
Next
oControl.Style = 2
Set oControl = nothing
set oItems=nothing
set oFolder=nothing
set oParentFolder=nothing
End Function
I've created a custom form based on Appointment. I have an extra tab
called Consultants Activity Recording, and on that tab I also have a
combobox called ComboBox1.
When I click on the combobox, I want it to display a list of all the
companys in my public folder.
I've added the following code to the form, but my combobox is blank.
What have I done wrong? Many Thanks.
Function Item_Open()
Dim oParentFolder
Dim oFolder
Dim oItems
Dim oControl
Dim i
on error Resume next
Set oParentFolder =
Application.ActiveExplorer.CurrentFolder.Parent.Parent
Set oFolder = oParentFolder.Folders("Public
Folders").Folders("Favorites").Folders("Discrete Customers")
Set oItems = oFolder.items
oitems.sort("Company")
set oControl = Item.GetInspector.modifiedFormPages("Consultants
Activity Recording").Controls("ComboBox1")
For i = 1 to oitems.count
oControl.AddItem oitems.item(i).Company
Next
oControl.Style = 2
Set oControl = nothing
set oItems=nothing
set oFolder=nothing
set oParentFolder=nothing
End Function