Re: How to set the DataSource to UserControl
On 9 Mar 2000 06:59:49 -0800, "Žydrūnas" <firstname.lastname@example.org>
>I created control which contains one standard TextBox. There is the code for
>get and set DataSource property :
>Public Property Get DataSource() As DataSource
> Set DataSource = Text1.DataSource
>Public Property Set DataSource(ByVal New_DataSource As DataSource)
> Set Text1.DataSource = New_DataSource
> PropertyChanged "DataSource"
>When I set the DataSource for my control at forms design time, application
>breakes down. But if I set the DataSource for my control at run time, it's
>Problem 1 : I want to set DataSource at forms design form. What I should
>Problem 2 : How me to retrieve DataFields?
Check out the MSDN topic Binding a Control to a Data Source under
Using Visual Basic/Component Tools Guide/Creating ActiveX
Components/Building ActiveX Controls/Visual Basic ActiveX Control
Features. It shows a much easier way to do what you are trying to do,
and as a bonus, it works!
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center