Click to See Complete Forum and Search --> : binding controls to Data control in other form
AndrejZ
Jul 31st, 2000, 03:07 AM
How can i bind a control (List or Combo) to a Data control in some other form in the same application
Dr_Evil
Jul 31st, 2000, 07:29 AM
Try this.
For ADO
Set Combo1.DataSource = Form1.Adodc1
For DAO
Set Combo1.DataSource = Form1.Data1
You'll also have to set the DataField property of the control.
AndrejZ
Aug 1st, 2000, 12:48 AM
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?
honeybee
Aug 1st, 2000, 01:48 AM
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.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.