Just curious, what's the AxMSDataListLib.AxDataComb
Main Topics
Browse All TopicsI'm in the process of converting a large ADO based VB6 database application to VB.NET. There are about 70 dataforms, and most of them have one or more datacombos on them that operate as lookup combos, using the DataField, BoundColumn, ListField, RowSource and DataSource properties.
For the time being, I want to continue to use ADO (2.7) rather than ADO.NET, maybe perform that conversion at a later stage.
The VB6 Conversion Wizard converts VB6's DataCombo controls into AxMSDataListLib.AxDataComb
So my question is: can the AxMSDataListLib.AxDataComb
Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
mondayblueboy,
I've put the AxMSDataListLib.DLL onto my website, take a look at it.
http://www.rodtv.com/Sourc
To use it, just make a normal combobox, and change from System.Windows.Forms.Combo
The upgrade wizard translates all ActiveX Form Controls into .NET compatible AxtiveX controls; only a few controls like the textbox are translated into native .NET controls. AxMSDataListLib.AxDataComb
Now, I'm already able to *manually* program the AxMSDataListLib.AxDataComb
- Set the lookup ADOrecordset bookmark to the key that corresponds in the main recordset using the rs.Find method;
- Set the RowSource property of the lookup combo to the lookup recordset;
- Set the ListField property of the combo to the name of the description column in the rs;
- Set the CtlText property of the combo to the value of the description column in the rs;
When the user clicks OK:
- Retrieve the combo's SelectedItem into an object variable BM
- Set the lookup recordset BookMark to this BM variable (now it's synchronised with the selected value)
- Set the column in the main recordset to the value in the lookup recordset
Finally update and close the main recordset.
OK, this works. No need to write a loop for the lookup recordset to fill the combo! Seven lines of code per lookup combo, so it can be done. But it's not nearly as elegant as the original VB6 databinding code, where you create automatic lookup combo's by assigning just five properties. So I'm still wondering if this can be accomplished by using the VB6.MBindingCollection.Add
Hans.
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:
PAQ with points refunded
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
TheLearnedOne
EE Cleanup Volunteer
Business Accounts
Answer for Membership
by: morphinexPosted on 2003-09-22 at 08:20:58ID: 9406334
hveluwen, I feel your pain. I really do.
eThing lds("Field Name").val ue)
We didn't know what to do back when we converted from VB6 to VB.NET ~ we were using some kind of weird global modules that imports SQL Stored Procedures that could be used as recordsets and datafields in combo boxes.
The converter didn't like that, and we had countless errors popping up left and right. We started month long project to convert every single combo box from databinding to doing crazy loops like this one...
Dim rs_ThisRecordSet As Recordset
Set rs_ThisRecordSet = mRS_Global.m_rsdbo_LoadSom
Do Until rs_ThisRecordSet.EOF
thisComboBox.AddItem Trim$(rs_ThisRecordSet.Fie
rs_ThisRecordSet.MoveNext
Loop
Call rsOpen(rs_ThisRecordSet, False)
... I replaced so many combo boxes.. it was crazy. I even made little programs where I would stick in the combo box name, the stored procedure name, and the field name, and it'd generate code to throw into the form.
Anyway, I hope someone will come up a better answer than what I've given...
Best of luck!