Enhance the TextBox control
1. I created a new ActiveX control. (named "myTextBox")
2. I put a TextBox control onto the UserControl.
3. I created a Text property.
4. I checked "Property is DataBound" and "This property binds to a datafield" in Tools/Procedure Attributes dialog for the Text property.
When I put my control onto a form I can set its DataSource, DataMember and DataField properties. Everything is ok, but I cant refer to its DataSource property from code:
myTextBox.DataSource /Error "Method or Datamember not found!"
When I update the recordset (bounded to myTextBox) I would need to rebind its DataSource property, but I cant.
5. I created DataSource property for myTextBox.
It causes error: "Ambiguous name detected ~"
Beacuse it already has a DataSource property behind my code.
plz help
I starting to get crazy and jump out the window, I have been working on this problem for a week. I tried out all possibilities and DOESNT WORK! I just want to create a new data-sink TextBox control with 1 Text property.
Re: Enhance the TextBox control
Re: Enhance the TextBox control
er, I just had a thought. You cannot create a Public Property on a usercontrol that already exists (as you have correctly surmized). DataSource may be an existing Property on the default Usercontrol control that exists on the GUI only (not accessible through code).
Did you use the Wizard to create your Usercontrol, or make it from scratch?