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
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)
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.