Hi,
I have a combo box on an options form contained in the report. I can set the (Data Bindings) Items property and the combo box loads fine when loading. What I need to do is load the combo box from code after the form is displayed, I've tried using: this.cboEmployee.ItemsBinding = "CompanyEmployee.Employee_Name"; where CompanyEmployee is a datasource and Employee_Name is a field in that datasource, but it does nothing. Is there a DataBind or DataRefresh function I should be calling? How do I do this?
Thanks,
Scot
populating combo box from code
populating combo box from code
Hello Scot,
Try to use following code:
Thank you.
Try to use following code:
Code: Select all
CompanyEmployee.First();
while (!CompanyEmployee.IsEof)
{
cboEmployee.Control.Items.Add(CompanyEmployee.Employee_Name);
CompanyEmployee.Next();
}