VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Subroutine to display a recordset on a form.

by yunus saiyad (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 20th June 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Subroutine to display a recordset on a form.

Rate Subroutine to display a recordset on a form.




Public Sub BIND(frm As Object, r As Recordset)
Dim CTL As Control
Dim i As Integer
    For i = 0 To r.Fields.count

      For Each CTL In frm.Controls

         If TypeOf CTL Is TextBox Or TypeOf CTL Is OptionButton Then

             If (CTL.Tag) = i Then

                     Set CTL.DataSource = r
                   
                         CTL.DataField = r.Fields(i).Name
                    
             End If
 
         End If

      Next CTL

    Next i

End Sub



Download this snippet    Add to My Saved Code

Subroutine to display a recordset on a form. Comments

No comments have been posted about Subroutine to display a recordset on a form.. Why not be the first to post a comment about Subroutine to display a recordset on a form..

Post your comment

Subject:
Message:
0/1000 characters