Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21288

ADODC - Query and next record?

$
0
0
So I've got the ADODC element on my form and I have it all setup correctly, I can populate the database with the following:

Code:

                With ADO
                .Refresh
                .Recordset.AddNew
                .Recordset.Fields("CompanyName") = Company_TxtBox.Text
                .Recordset.Fields("Address") = Address_TxtBox.Text
                .Recordset.Fields("City") = City_TxtBox.Text
                .Recordset.Fields("State") = State_TxtBox.Text
                .Recordset.Fields("ZipCode") = ZipCode_TxtBox.Text
                .Recordset.Fields("PhoneNumber") = PhoneNumber_TxtBox.Text
                .Recordset.Fields("SellerType") = SellerType_Combo.Text
                .Recordset.Update
                End With

I have an edit button though that I'd like to have it load the current data into the textboxes and I just can't figure this out.
Also how can I perform a select statement on the database and search for say companies that are in that table?

I've looked at a lot of stuff online but it's not clicking and I can't figure out how to make it work with my project.

Any advice would be greatly appreciated, this is really a fun project that I'm trying to do to get familiar with databases.

Viewing all articles
Browse latest Browse all 21288

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>