Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

USING A CLASS MODULE AS A DATA SOURCE

Status
Not open for further replies.

TNN

Programmer
Sep 13, 2000
417
US
Does anybody out there know how to create a class module as a data source using ADO in code(NOT A DATA CONTROL) and then bind text boxes from a form to the class module to display recordsets from a database??
I know how to use ADO to access a database and create a recordset but do not know the procedures to set up the class module and then bind the text boxes to the class module. Can anyone give me a step by step procedure??
Thank You,
TNN, Tom
TNPAYROLL@AOL.COM [sig]<p>TOM<br><a href=mailto:WWW.TNPAYROLL@AOL.COM>WWW.TNPAYROLL@AOL.COM</a><br>[/sig]
 
I was hopeing some of the Guru's would anwser your question because I found it interesting. I will tell you what I know which aint a whole lot

Creating a Data Source class is fairly straight forward, The wizards will do a good job for you, All you will have to do is polish it up a bit.

The part I'am not so sure on is binding the TextBoxes. Once your done with the Clases there is a couple of things you need to do, If you used the wizard the first part is done for you.

1. Create a reference to Microsofts Data Binding Collection
2. Set the class(s) DataBindingBehavior property to vbSimpleBound
3. Use the BindingCollection object to link the property in your class that exposes the field you want to Bind to the Textbox.

Sorry that this is light on specifics, I'am still working on the details myself, but I believe I'm going in the right direction. Please post any progress you make.

Collin [sig][/sig]
 
Collin,

Thank You

I did it but now I don't know what I did. As soon as I can understand what I did I will pass it on. The problem is there are sooo many ways of doing these things.

Thank You for your interest

TNN, Tom
TNPAYROLL@AOL.COM [sig]<p>TOM<br><a href=mailto:WWW.TNPAYROLL@AOL.COM>WWW.TNPAYROLL@AOL.COM</a><br>[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top