Hi Ian, Here's a little sample that uses the result of scrolling the combobox to stick the cust_pk of the selected customer back into the company field of the selected customer record. It's a funny example, but I didn't want to involve two tables, but the logic is the same to stuff the cust_pk into a field in another table. My combobox uses a business object method called FillTop100() to load the first 100 customers. I also have a little label beside my combobox to show that it's working. The PopulationDataSourceSettings dialog hopefully show what's required.
using System;
namespace ViewTest
{
public partial class Form1 : MicroFour.StrataFrame.UI.Windows.Forms.StandardForm
{
public Form1()
{ InitializeComponent();
customerBO1.FillTop100();
}
private void comboBox1_SelectedValueChanged(object sender, EventArgs e)
{
if (comboBox1.SelectedValue != null)
{ customerBO1.SeekToPrimaryKey(comboBox1.SelectedValue.ToString());
customerBO1.cust_Company = comboBox1.SelectedValue.ToString();
customerBO1.Save();
label1.Text = customerBO1.cust_Company + " stored in cust_Company"; }
}
}
}