Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Jul 24, 1997

ActiveX & Data controls

Question:
I Want to make my own data control navigator bar in a single OCX. My question is: How can i get the DataSource property to work.

It needs to give me a list of all availables Data controls on the form and let me pick one of them in the property list. Also it needs to send the command to that Data control. Eg: Data1.Recordset.MoveNext.

Answer:
You can loop through the controls in the Controls collection of the Form. Use the TypeOf function to build a line like this:

If TypeOf(loopVar) Is DataControl Then
   add it to the list

Use the class name of the Data control, which is the text next to the name in the Properties window.
DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date