|
-
Oct 21st, 2000, 11:14 PM
#1
Thread Starter
Lively Member
Say I have a database named test.mdb.
Inside that database exists a table named Includes which houses only two fields.
Now, I want to import all of the contents from one of the fields to a list box. To do that I've created something that looks like this:
Private Sub Form_Load()
Set DB = OpenDatabase("test.mdb")
For i = 1 To 9
Set RS = DB.OpenRecordset("SELECT * FROM _
Includes WHERE ID = " & i & "", dbOpenDynaset)
List1.AddItem "" & RS!IncludeTitle, List1.ListCount
Next i
RS.Close
End Sub
But this seems to only import the first nine (for i = 1 to 9), I know there's an easier way to do it.
Any suggestions? =).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|