VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



A one line call to populate either a combo box or a list box with the results of a recordset genera

by Robert Gray (2 Submissions)
Category: Miscellaneous
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Fri 15th June 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

A one line call to populate either a combo box or a list box with the results of a recordset generated by an SQL call. I've tested this with

Rate A one line call to populate either a combo box or a list box with the results of a recordset genera




                        Rs.MoveLast
                        Rs.MoveFirst
                        Do While Not Rs.EOF
                           ctlControl.AddItem Rs(0)
                           Rs.MoveNext
                        Loop
End Sub

From your program, just say:   Call PopulateRs(RecordsetName, List1) or
Call PopulateRs(RecordsetName, Combo1)


Download this snippet    Add to My Saved Code

A one line call to populate either a combo box or a list box with the results of a recordset genera Comments

No comments have been posted about A one line call to populate either a combo box or a list box with the results of a recordset genera. Why not be the first to post a comment about A one line call to populate either a combo box or a list box with the results of a recordset genera.

Post your comment

Subject:
Message:
0/1000 characters