How can i bind a control (List or Combo) to a Data control in some other form in the same application
Printable View
How can i bind a control (List or Combo) to a Data control in some other form in the same application
Try this.
For ADO
For DAOCode:Set Combo1.DataSource = Form1.Adodc1
You'll also have to set the DataField property of the control.Code:Set Combo1.DataSource = Form1.Data1
I tried this before I asked the question for the first time, but I get the message during comiplation: Method or data member not found, which points to DataSource property of the control. Also Help tells me that DataSource is not available at runtime. Maybe it's my version of VB - 5.0 SP3?
AndrejZ,
Your question is correct. The DataSource property can only be assigned during design time and not in runtime. There is nothing wrong with your VB5.
And given that, there does not seem to be a solution to your problem, because at design time, you cannot access another form's controls.