Avatar of esps

asked on 

Convert code from VB 6 to VB 2005

I am finally moving ahead and need a kickstart please.
Please help me to convert code like the following piece of code from VB 6 to VB 2005.

Dim dbs As Database
    Dim rst As Recordset
    Dim doorlist As Recordset
    Dim temp_clean As Recordset 'tempory table to store selections before update
    Set dbs = OpenDatabase("jp_imgdb.mdb")
    If Spec2Single.Value = True Then
        Set doorlist = dbs.OpenRecordset("list_single")
    End If
    If Spec2Double.Value = True Then
        Set doorlist = dbs.OpenRecordset("list_double")
    End If
    With doorlist
        Do While Not .EOF
            If !Description = Doortypedis Then
                dbname = !TablesofDoors
                Exit Do
            End If
    End With
    Set rst = dbs.OpenRecordset(dbname)
Visual Basic Classic

Avatar of undefined
Last Comment
Anthony Perkins
Avatar of Arthur_Wood
Flag of United States of America image

Blurred text
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of esps


Thanks AW. It makes a lot of sense however a little bit more please.
I have a form in VB2005, created a DB in Access and a table called TimeBilled. I've added this table as a data source and dragged it onto the form letting VB create the dataset, binding, links to the fiels,etc. As a background process I want to extract a number of values from rows in a different table. Then update the some fields on the form. I then want to open a 3rd table and update values in a record that I will search for based on input received from the form. I hope this makes sense. The code I've provided originally was an extracted sample.
Avatar of esps


I am not getting any additional advice on this one and would like to close the question. However, the advice from Arthur Wood has helped me enough to be worth 200 points.

best regards
Avatar of Anthony Perkins
>>However, the advice from Arthur Wood has helped me enough to be worth 200 points.<<
Post a message in Community Support (the link is at the top right hand corner titled Support) to that effect.
Don't forget to include a reference to this thread.
Visual Basic Classic
Visual Basic Classic

Visual Basic is Microsoft’s event-driven programming language and integrated development environment (IDE) for its Component Object Model (COM) programming model. It is relatively easy to learn and use because of its graphical development features and BASIC heritage. It has been replaced with VB.NET, and is very similar to VBA (Visual Basic for Applications), the programming language for the Microsoft Office product line.

Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews


IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo